Home » JS » Top Javascript Interview Questions And Answers Part 2

Top Javascript Interview Questions And Answers Part 2

1. How can you create an Array in JavaScript?

We can define arrays using the array literal which are below-

var A = [];
var B = [1, 2, 3];

2. What is the use of ‘This’ operator in JavaScript?

this keyword refers to the object it belongs to.

3. What is Callback?

callback is a plain JavaScript function passed to some method as an argument or option. Callback is a function that is to be executed after another function has finished executing. In JavaScript, functions are objects. Because of this, functions can take functions as arguments, and can be returned by other functions.

4. Name some of the JavaScript Frameworks?

A JavaScript framework is an application framework written in JavaScript. It differs from a JavaScript library in its control flow. The most commonly used frameworks are:

  • Angular
  • React
  • Vue
  • Node

5. What is NaN in JavaScript?

NaN is a short form of Not a Number. When a string or something else is being converted into a number and that cannot be done, then we get to see NaN.

One comment

  1. I precisely desired to appreciate you once again. I am not sure the things that I would have implemented without the entire hints shown by you concerning that area. It was a very frightful problem in my view, however , being able to view the professional tactic you managed it made me to weep over contentment. I’m just grateful for the guidance and sincerely hope you realize what a powerful job you were getting into educating people today all through your websites. I’m certain you have never met all of us.

Leave a Reply

Your email address will not be published. Required fields are marked *