JavaScript FUNCTION EXPRESSIONS in 7 minutes! 🐣

Поделиться
HTML-код
  • Опубликовано: 7 сен 2024
  • // function expressions = a way to define functions as
    // values or variables
    // 1. Callbacks in asynchronous operations
    // 2. Higher-Order Functions
    // 3. Closures
    // 4. Event Listeners
    const hello = function(){
    console.log("Hello");
    }
    hello();
    setTimeout(function() {
    console.log("Goodbye");
    }, 3000);

Комментарии • 10

  • @BroCodez
    @BroCodez  11 месяцев назад +3

    // function expressions = a way to define functions as
    // values or variables
    const numbers = [1, 2, 3, 4, 5, 6];
    const squares = numbers.map(function(element){
    return Math.pow(element, 2);
    });
    const cubes = numbers.map(function(element){
    return Math.pow(element, 3);
    });
    const evenNums = numbers.filter(function(element){
    return element % 2 === 0;
    });
    const oddNums = numbers.filter(function(element){
    return element % 2 !== 0;
    });
    const total = numbers.reduce(function(accumulator, element){
    return accumulator + element;
    });
    console.log(total);

  • @piotrmazgaj
    @piotrmazgaj 25 дней назад +1

    This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal.

  • @hunin27
    @hunin27 9 месяцев назад +4

    thanks bro! Can we do a big project to work on with all the things we will have learned? maybe in a week? ( also a normal project is okay. but a bigger one would be better for all of us and i think you would also get more views. also maybe do some shorts on youtube with some tips and tricks to gain subscirbers. thanks ❤

  • @adityashinde7815
    @adityashinde7815 7 месяцев назад +9

    const sayThanks = function () {
    console.log("Thank you! Bro Code");
    };
    sayThanks();

  • @revodevan1394
    @revodevan1394 10 месяцев назад +1

    thank you brocode, you are my bro 🌟🌟🌟

  • @oakleypankratz8547
    @oakleypankratz8547 2 месяца назад

    channel lives up to its name gg gro

  • @gichuhisamuel4387
    @gichuhisamuel4387 9 месяцев назад +1

    Thank you bro 😎

  • @bhuvandwarasila
    @bhuvandwarasila 9 дней назад

    fire bro

  • @user-ej4vt2vg4o
    @user-ej4vt2vg4o 2 месяца назад

    bro please teach us typescript

  • @Blitz61wasd
    @Blitz61wasd 9 месяцев назад +1

    Django course please