Thursday, August 25, 2022

And see that snippet of the mdn why the inside function haven't name

 And the inner function doesn't have name, the functions have names to be called and the ones that don't name are anonymous functions, you can think----??????----

And there in some place, far from that snippet is said that a function without a name is executed since it'swrite so isn't called you write an anonymous function it will work just at the moment that the run the code, so isn't called is immediately executed.

const pet = function (name) {   // The outer function defines a variable called "name"
  const getName = function () {
    // The inner function has access to the "name" variable of the outer function
This is important? why? Because if give it a name you gonna have to make call for a inner function?! Rute Bezerra de Menezes Gondim

No comments:

Post a Comment