I didn't understand the Return Keyword (7)


I get the right answer after editing the syntax many times but didn't get the real meaning of this solution. Can you please, describe me this whole solution?


return is literal what it means. The function hands you something back:

var example = function(){
    return "hello world"
x = example()

i store what the function returns in x, and then log x to the console.


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