I didn't understand the Return Keyword (7)


#1

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?


#2

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

var example = function(){
    return "hello world"
}
x = example()
console.log(x)

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


#3

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