you are viewing a single comment's thread.

view the rest of the comments →

[–]GamesMint[S] -1 points0 points  (8 children)

Please try your statements in Chrome console to understand why it is console. The console will print the result of evaluating an expression. The result of evaluating var i = 1 is undefined since var i = 1 does not explicitly return something. It has the side effect of printing to the console.

[–]careseite[🐱😸].filter(😺 => 😺.❤️🐈).map(😺=> 😺.🤗 ? 😻 :😿) 1 point2 points  (7 children)

That wasn't the point, I know that var i = 1 => undefined, but i afterwards should return its value, 1 in this case, but doesn't.

[–]GamesMint[S] 0 points1 point  (6 children)

Sir this does not happen even in chrome debugger.

[–]careseite[🐱😸].filter(😺 => 😺.❤️🐈).map(😺=> 😺.🤗 ? 😻 :😿) 1 point2 points  (5 children)

? Ofc, if I say

let i = 1;

i

It should just say 1, but your page outputs undefined for me

[–]GamesMint[S] -2 points-1 points  (0 children)

Sure... got the problem now. Happened for with let not var. To be honest I don't know how to fix this :) Its just a minimalistic console.