JavaScript Quiz

In this JavaScript Quiz section – every Question Carries 2 Marks. If any question is wrong then two marks will be deducted.

Note: – Fill the information Correctly to get Certified.

JavaScript

1 / 50

What does JavaScript primarily allow you to do?

2 / 50

Which keyword is used to declare a variable in JavaScript?

3 / 50

Which data type represents true or false values in JavaScript?

4 / 50

What is the correct syntax for an if statement in JavaScript?

5 / 50

Which operator is used for concatenating strings in JavaScript?

6 / 50

What will the following code output? console.log(2 + "2");

7 / 50

Which function is used to output data to the console in JavaScript?

8 / 50

What does the typeof operator return for a function?

9 / 50

Which statement is used to exit from a loop in JavaScript?

10 / 50

What is the correct way to comment in JavaScript?

11 / 50

Which method is used to add an element to the end of an array in JavaScript?

12 / 50

What will the following code output? console.log("5" + 3 + 2);

13 / 50

Which operator is used for strict equality comparison in JavaScript?

14 / 50

How do you declare a constant variable in JavaScript?

15 / 50

What will the following code output? console.log("Hello".length);

16 / 50

Which keyword is used to define a function in JavaScript?

17 / 50

What is the correct way to include an external JavaScript file in an HTML document?

18 / 50

Which method is used to remove the last element from an array in JavaScript?

19 / 50

What is the purpose of the setTimeout() function in JavaScript?

20 / 50

What will the following code output? console.log(typeof null);

21 / 50

Which operator is used to access properties of an object in JavaScript?

22 / 50

What is the correct way to declare a single-line comment in JavaScript?

23 / 50

Which method is used to convert a string to uppercase in JavaScript?

24 / 50

What is the output of the following code?

25 / 50

Which method is used to concatenate two or more arrays in JavaScript?

26 / 50

What will the following code output? console.log(5 == "5");

27 / 50

Which function is used to parse a string and return an integer in JavaScript?

28 / 50

What is the correct way to loop through elements of an array in JavaScript?

29 / 50

Which operator is used for logical AND in JavaScript?

30 / 50

What will the following code output?

31 / 50

Which method is used to find the index of a specified value in an array in JavaScript?

32 / 50

What is the correct way to write an anonymous function in JavaScript?

33 / 50

What is the purpose of the this keyword in JavaScript?

34 / 50

Which method is used to convert an object to a JSON string in JavaScript?

35 / 50

What will the following code output? console.log(10 % 3);

36 / 50

Which method is used to remove the first element from an array in JavaScript?

37 / 50

What is the correct way to write an else if statement in JavaScript?

38 / 50

Which function is used to round a number down to the nearest integer in JavaScript?

39 / 50

What is the output of the following code?

39 No

40 / 50

Which function is used to execute a piece of code repeatedly at fixed intervals in JavaScript?

41 / 50

What will the following code output? console.log(Boolean(0));

42 / 50

Which method is used to sort elements of an array in JavaScript?

43 / 50

What is the purpose of the new keyword in JavaScript?

44 / 50

Which method is used to convert a string to lowercase in JavaScript?

45 / 50

What will the following code output?

45 No

46 / 50

What does the Array.isArray() method check for in JavaScript?

47 / 50

Which method is used to convert a number to a string in JavaScript?

48 / 50

What is the correct way to write a for loop in JavaScript?

49 / 50

What will the following code output? console.log("Hello" + " " + "World");

50 / 50

Which method is used to remove elements from an array with specified positions in JavaScript?

Your score is

The average score is 0%

0%

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top