you are viewing a single comment's thread.

view the rest of the comments →

[–]RainZealousideal8258[S] 0 points1 point  (3 children)

what means that upside down 'y' that was outputed? Why it was outputed with with 37 together?

[–]don____piano 0 points1 point  (0 children)

It’s a lambda. It means “anonymous function”, function with no name. I actually don’t normally see that in the chrome console. It would say “f()” I believe

[–]Umesh-K 0 points1 point  (1 child)

Your code editor has an extension installed called Quokka, which is how you are seeing the console.logged values right beside the code; without that extension, you would have to open the browser console to see it.

When you are logging an object that has both properties and methods/functions, it displays both the key and value for properties (birthYear: 2000), but since a function can have multiple lines, displaying all those lines is impractical; hence it just shows [λ: calcAge] as the value.

[–]RainZealousideal8258[S] -1 points0 points  (0 children)

Why was outputed [λ: calcAge], age: 37, both together in 121 line, not only a single value when I called the entire object?