Skip to main content



javascript snippets interview questions set 2

For the previous set please refer to javascript snippets questions set 1. Let's  begin with set 2, Q6)What is the result of running this code? sum(10, 20); diff(10, 20); function sum(x, y) {   return x + y; } let diff = function (x, y) {   return x - y; };  a) 30, ReferenceError, 30, -10  b) 30, ReferenceError  c) 30, -10  d) ReferenceError, -10 Q7)Which of the following values is not a Boolean false?  a) Boolean(0)  b) Boolean("")  c) Boolean(NaN)  d) Boolean("false") Q8)For the following class, how do you get the value of 42 from an instance of X? class X {   get Y() {     return 42;   } } a) x.get('Y') b) x.Y c) x.Y() d) x.get().Y  Q9)What's one difference between the async and defer attributes of the HTML script tag?  a) The defer attribute can work synchronously.  b) The defer attribute works only with generators.  c) The defer attribute works only with promises.  d) The defer attribute will asynchronously load the scripts in order. Q10)What val

Latest Posts

javascript snippets interview questions set 1

Node.js (v.15) 4 things to know.

Coding Interview Questions set 4

Javascript interview questions set 2

Coding Interview Questions Set 3

Css Interview Questions Set 1

Coding Interview Questions Set 2

Coding Interview Questions Set 1

Node.js: Downloading a xml file from given url and reading its data elements.

2 JavaScript Interview Questions that you must know.

4 html interview questions that you must know.

Javascript/Node.js: 2 Features that you might not know.

Node.js: Bundling your Node.js application to single executable for Windows.

Node.js: Extract text from image using Tesseract.

JavaScript: MediaDevices(Opening webcam to capturing image and downloading it)