JavaScript Interview Questions
Questions Answers Views Company eMail

How do you extend classes Code snippet: const circle = { radius: 20, diameter() { return this.radius * 2; }, perimeter: () => 2 * Math.PI * this.radius };

1 1014

Can you write a random integers function to print integers with in a range?

1 1112

What is the output of below code var car = new Vehicle("Honda", "white", "2010", "UK"); console.log(car); function Vehicle(model, color, year, country) { this.model = model; this.color = color; this.year = year; this.country = country; }

1 1506

Event handler Example

1 894

What will be the output of the code below? var Y = 1; if (function F(){}) { y += Typeof F; } console.log(y);

1 1237

What will be the output of the following code? //nfe (named function expression) var Foo = Function Bar() { return 7; }; typeof Bar();

1 1166

What is a “closure” in JavaScript? Provide an example

1 996

What is the difference between let, const, and var?

1 264

Explain the difference between == and === in JavaScript.

1 209

What is the difference between synchronous and asynchronous JavaScrip

1 264

What is the event loop in JavaScript?

1 269

What is a Promise in JavaScript?

1 252

What is this in JavaScript?

1 226

What is call(), apply(), and bind()?

1 247


Post New JavaScript Questions

Un-Answered Questions { JavaScript }

What is scope chain in javascript?

705


What is local and global scope?

712


Name the numeric constants representing max, min values?

772


Can webassembly replace javascript?

703


Explain how can you submit a form using JavaScript?

675


What will happen if an infinite while loop is run in Javascript?

714


Explain the term closure?

787


How to access the value of a textbox using javascript?

721


What is npm repository?

651


Name the different types of pop up boxes in Javascript?

751


How to determine the state of a checkbox using javascript?

831


When would you use javascript closures?

655


Which is better python or javascript?

687


Who introduced javascript?

710


What is a named function in JavaScript? How to define a named function?

730