What is the difference b/w these two function declaration:
let stop = function(){
console.log('s');
}
&
function stop(){
console.log('s');
}
What is the difference b/w these two function declaration:
let stop = function(){
console.log('s');
}
&
function stop(){
console.log('s');
}
they’re both called the exact same way and do the exact same thing…
but I think if you want to change what ‘stop’ is , that is, if you want to change the stop function dynamically in the code, the first method is the only way to do it because you can later say:
stop = function(newParam) {
console.log(newParam);
}