JavaScript

/10
2 votes, 4.5 avg
18
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

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

3 / 10

What’s the output?

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

4 / 10

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

5 / 10

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

6 / 10

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

7 / 10

What’s the output?

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

8 / 10

What’s the output?

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

9 / 10

What would be the output of below code?

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

10 / 10

What’s the output?

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

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