BEST JAVASCRIPT QUSETIONS 2018

Javascript is one of most popular programming language for the web. It is widely used for creating interactive client-side web applications and games. Javascript can be also used as server-side programming language. It is dynamic, weakly typed, prototype-based and multi-paradigm high-level programming language. Here we have listed 10 Common Javascript Interview Questions with their answers

4. How to create an object in JavaScript?

5. Explain prototypal Inheritance in JavaScript?

In JS every object has a property called a prototype, where we can add methods to it and when you create another object from these the newly created object will automatically inherit its parent’s property.

6. Explain callback in JavaScript?

A callback is a plain JavaScript function passed to some method as an argument or option. Some callbacks are just events, called to give the user a chance to react when a certain state is triggered.

8. What will be output of below code?

Ans: The output would be undefined because the delete operator removed the property “ipsum” from the object “lorem” before the object was returned. When you reference a deleted property, the result is undefined.

9. What is output of 5 + 4 + “3”?

Since 3 is a string then output of above code will 93.

10. What is the real name of Javascript?

The original name of Javascript is Mocha by the Marc Addressed. He was the founder of Netscape.