JavaScript FUNCTION EXPRESSIONS in 7 minutes! 🐣

preview_player
Показать описание
// 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(){
}

hello();

setTimeout(function() {
}, 3000);
Рекомендации по теме
Комментарии
Автор

// function expressions = a way to define functions as
// values or variables

const numbers = [1, 2, 3, 4, 5, 6];

const squares =
return Math.pow(element, 2);
});
const cubes =
return Math.pow(element, 3);
});
const evenNums =
return element % 2 === 0;
});
const oddNums =
return element % 2 !== 0;
});
const total = numbers.reduce(function(accumulator, element){
return accumulator + element;
});

console.log(total);

BroCodez
Автор

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

sayThanks();

adityashinde
Автор

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 ❤

hunin
Автор

thank you brocode, you are my bro 🌟🌟🌟

revodevan