Being a fresher it’s a lot difficult to prepare for an interview. You will have very little idea and experience regarding their requirements, what ...
For further actions, you may consider blocking this person and/or reporting abuse
Your anonymous function example is not an anonymous function. Try:
Yes, it has a name. It's not anonymous
You're also missing 2 data types -
BigInt
andSymbol
I'm also curious where you're interviewing, as this interview technique is a pretty poor way to see if someone is a good developer
"Everything is an object"
No, primitives aren't object.
Primitives are called that basically because they are represented as is in the underlying C++ code, or bytecode.
But in JS, everything is an object.
undefined
, for example is a property that lives in the window object of a browser. Naturally, in JS primitives are wrapped in their [forgot the ECMA-naming-convention] object. But as long as you assign a primitive to a variable or use () or return it (thus wrapping it in an object), it becomes an object on its own automatically because of the prototypical nature of the language.yeah but they are wrapped in object
Yep, you can add methods to numbers
Hi there, it appears that this post contains affiliate links. We ask that posts including affiliate links also contain a clear disclaimer so that readers are aware. Here is some suggested language:
This post includes affiliate links; I may receive compensation if you purchase products or services from the links provided in this article.
is ok
There are more than 2 types of scope.
Global, Local and block
Thanks - from a newbie who is preparing for the first interview, this is helpful. Folks have pointed out flaws in your example code, but the most helpful thing is the list of topics, which I can go back and research from MDN and other sources.
Thanks for sharing this with us
the self promotion was bit too much! it got me distracted several times!
try to avoid putting these ads at middle of the reading part!
it's not right. Almost 7 years js has Function scope and "let" keyword
Can you please add some disclaimer to the post, regarding the LambdaTest ads?