HomeArenaJavascript Quiz For Intermediates

Javascript Quiz For Intermediates

299
Created on

Javascript Quiz For Intermediates

Remember that multiple-choice questions can be helpful for testing specific knowledge, but they may not fully assess a person's understanding and problem-solving skills in real-world scenarios. So, it's always a good idea to combine them with practical coding exercises and projects.

1 / 10

What is the output of the following code?

function foo() {
let x = 10;
function bar() { console.log(x); }
return bar;
}
let closureFunc = foo();
closureFunc();

2 / 10

Which array method in JavaScript creates a new array with the results of calling a provided function on every element in the calling array?

3 / 10

What is the purpose of the `bind()` method in JavaScript?

4 / 10

What will be the output of the following code?

const arr = [1, 2, 3, 4, 5];
const result = arr.reduce((acc, curr) => acc + curr, 10);
console.log(result);

5 / 10

Which keyword is used to declare a block-scope variable in JavaScript?

6 / 10

What does the `use strict` directive do in JavaScript?

7 / 10

Which of the following is NOT a valid way to create a new object in JavaScript?

8 / 10

What is the purpose of the `Promise` object in JavaScript?

9 / 10

How can you clone an array `sourceArray` into a new array `targetArray` in JavaScript?

10 / 10

Which event listener can be used to detect when an HTML form element loses focus (i.e. the user clicks outside the element or tabs away)?

Your score is

The average score is 40%

0%

Previous articlePlayable Piano
Next articleCartoonify Image
RELATED ARTICLES

MCQ – 10/2/23

MCQ – 8/2/23

3 COMMENTS

  1. const arr = [1, 2, 3, 4, 5];
    const result = arr.reduce((acc, curr) => acc + curr, 10);
    console.log(result);

    result=25 and you marked it as wrong and 20 as right

LEAVE A REPLY

Please enter your comment!
Please enter your name here

three + one =

Most Popular