Dont understand 11


var nameString = function (name) {
	return "Hi, I am" + " " + name ;


i already did the code, and this outcome gives me [function = nameString]

and according to code academy it was right, since i called and printed what they told me, i assume what they actually wanted me to do was:

console.log (nameString("Kuma"))

what i dont get is, whats the difference between just calling the function and using the console.log to print it? both outcomes are exactly the same either



Take away this:

and your fine


u really didnt read the post... thats not the problem, and doing so would give me a fail on the lesson


The difference is...


is passing your name into the function called nameString and console.log is printing out the result of the function you are runninig.

and this...


is not running the function it is printing out that nameString is a function and does not recognize your name parameter.

I hope this answers your question?!


You didn't pass nameString a parameter here so console.log just prints what nameString is.


Yes @netjumper28973 u are right I was going to post that in just a second after that but I needed to do something so I was not able to finish. @jayvin took my post!!(No offence @jayvin)


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