JavaScript

/10
2 votes, 4.5 avg
16
Created on

JavaScript multi choice questions

1 / 10

What’s the output?

const obj = { a: ‘one’, b: ‘two’, a: ‘three’ };
console.log(obj);

2 / 10

What’s the output?

let x = 1;
x = (x++, x);
console.log(x);

3 / 10

Which of the following keywords is used to define a variable in Javascript?

4 / 10

Which of the following methods can be used to display data in some form using Javascript?

5 / 10

What’s the output?
const numbers = [1, 2, 3];
numbers[10] = 11;
console.log(numbers);

6 / 10

What’s the output?

function getAge(…args) {
console.log(typeof args);
}
getAge(21);

7 / 10

What’s the output?

!!null;
!!”;
!!1;

8 / 10

How to add new value inside WeakMap ?
const wkMap = new WeakMap();

9 / 10

What’s the output?

let number = 0;
console.log(number++);
console.log(++number);
console.log(number);

10 / 10

What would be the output of below code?

console.log(num);
let num = 20;

Your score is

0%

Please rate this quiz

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top