Beginners "return" concept

There is both the caller and the callee.

With myFunction(4, 5), that is the caller, which calls the function called myFunction, so the place in the code which defines the myFunction function using function myFunction is the callee.

let x = myFunction(4, 3); // caller

function myFunction(a, b) { // callee
  return a * b;
}

The return value of the myFunction function is the resulting value from a * b.
That value gets used in place of the caller, which in your code ends up being assigned to the variable called x.

Post #5

1 Like

I recommend you read a book for beginners and go through the lessons in order because they build upon earlier lessons. Going through videos in a random fashion will always leave out some concepts

You might pick up Novice to Ninja for starters.

1 Like

great idea!

thanks!

i suspect my skill set is no good as of now for some of the concepts i am struggling with

i joined premium :grinning:

have started Novice to Ninja

many thanks for the advice!

do i owe you a $0.25 now?

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.