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 647

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

1 707

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 851

Event handler Example

1 589

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

1 852

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

1 810

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

1 639


Post New JavaScript Questions

Un-Answered Questions { JavaScript }

What is the difference between window.onload and ondocumentready?

469


List out all the falsifying tokens in Javascript?

651


What and where are the best javascript resources on the web?

482


How to comment javascript code?

515


What is difference between promise and callback?

476






To set all checkboxes to true using javascript?

549


What does e mean in a function?

471


What are undeclared and undefined variables?

535


What applications use javascript?

454


What are the four types of javascript objects?

484


Explain the difference between “==” and “===”?

512


What is the main difference between Map collections and other collections such as Set.

2611


Javascript, Pass by Value or Pass by Reference?

522


Can you explain about screen object?

542


Is JavaScript a true OOP language?

616