10 Questions About Javascript

Q: What is the difference between “Null” and “Undefined”?

Answer: Null is an object and Undefined is a type. “Undefined “ means .. a variable declare but no value has been assigned. And “Null” is an assignment value you can assign in a variable.

Q: What is the difference between “==” and “===”?

Answer: “==” Double equal is abstract equality compares operator. Which is compare in value just. And “===” triple equal are strict equality, comparison operator. Which is compare in value with type

Q: What is hoisting in a variable?

Answer: In javascript “hoisting” is default behavior of moving all declarations to the top of the current scope.

Q: What is the difference in hoisting between var and let?

Answer: If you defined your variable with var then javascript move that to the top in block scope and global scope. It works from anywhere.
But if defined with let or const then javascript hoisted to the top of the block but not initialized.

Q: What is the difference between let and const?

Answer: If the variable is changeble then use let otherwise use const.

Q: What is the “NaN ” ?

Answer: If the value is not a number then return “Nan”.

Q: Which company developed JavaScript?

Answer: Netscape is the software company that developed JavaScript.

Q: What is ‘this’ keyword in JavaScript?

Answer: ‘This’ keyword refers to the object from where it was called. And it represent whose context is in.

Q: What is an undefined value in JavaScript?

Answer: Undefined value means the

  • Variable used in the code but doesn’t exist.

Q:What are the types of errors in JavaScript?

Answer: Load time errors, Runtime errors,Logical errors.

I am a web developer. I have excellent skills in web development. Worked in HTML, CSS3, Reactjs,Nextjs, Javascript, TypeScript, Bootstrap, and MaterialUI.