javascript-july-quiz

0%

javascript-july-quiz

1 / 50

What will be the output of this code?
let age = 18;
if (age < 18) { console.log("Minor"); } else if (age === 18) { console.log("Just became adult"); } else { console.log("Adult"); }

2 / 50

Which of the following is a valid variable name in JavaScript?

3 / 50

Which company developed JavaScript?

4 / 50

What is the correct syntax for referring to an external script called "LFC.js"?

5 / 50

Which of the following are the errors in JavaScript?

6 / 50

Find output of below Javascript addition code
document.write("1 plus 1 is " + 1 + 1);

7 / 50

The _______ method of an Array object adds and/or removes elements from an array.

8 / 50

The pop() method of the array does which of the following task ?

9 / 50

. Which of the following is a primitive data type in JavaScript?

10 / 50

Which of the following is block scoped?

11 / 50

Which of the following is not JavaScript Data Types?

12 / 50

Which operator is known as the strict equality operator, which checks whether its two operators are identical or not?

13 / 50

How to get a particular value using the tagged name?

14 / 50

If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?

15 / 50

Which of the following is an array method?

16 / 50

What is defination of an undefined value in JavaScript?

17 / 50

What if you use parseInt() to convert a string containing decimal value?

18 / 50

If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?

19 / 50

Syntax for creating a RegExp object:
1. var txt=new RegExp(pattern,attributes);
2. var txt=/pattern/attributes;
Which of the above mentioned syntax will correct?

20 / 50

Which method converts JSON to a JavaScript object?

21 / 50

What is the correct syntax for referring to an external script called "LFC.js"?

22 / 50

Which of the following is block scoped?

23 / 50

What will be the output if we compare "ten" and 10 with less then comparison operator( "ten" <10)?

24 / 50

What will be the output of: console.log(typeof NaN);

25 / 50

Which of the following is an array method?

26 / 50

The _______ method of an Array object adds and/or removes elements from an array.

27 / 50

How to get a particular value using the tagged name?

28 / 50

Which of the following is not a valid JavaScript variable name?

29 / 50

What if we put ++ operator inside if condition? find the output

30 / 50

Which symbol is used for comments in Javascript?

31 / 50

Why so JavaScript and Java have similar name?

32 / 50

Which of the following are the errors in JavaScript?

33 / 50

Variable declared is example of ________________ Variable.
function message() {
var varname = "Rajiv";
alert(name);
}

34 / 50

Which of the following is block-scoped?

35 / 50

Which operator is known as the strict equality operator, which checks whether its two operators are identical or not?

36 / 50

Which of the following method checks if its argument is not a number?

37 / 50

Which of the following is not a valid JavaScript variable name?

38 / 50

What will be the output of the following JavaScript code?
num1=5;
function cal() {
num1=10;
num2=5;
num3=num2*num1;
console.log(num3);
}
cal();

39 / 50

What will be the output of the following JavaScript code?
num1=5;
function cal() {
num1=10;
num2=5;
num3=num2*num1;
console.log(num3);
}
cal();

40 / 50

Why so JavaScript and Java have similar name?

41 / 50

Syntax for creating a RegExp object:
1. var txt=new RegExp(pattern,attributes);
2. var txt=/pattern/attributes;
Which of the above mentioned syntax will correct?

42 / 50

The pop() method of the array does which of the following task ?

43 / 50

What if we put ++ operator inside if condition? find the output

44 / 50

What if you use parseInt() to convert a string containing decimal value?

45 / 50

Variable declared is example of ________________ Variable.
function message() {
var varname = "Rajiv";
alert(name);
}

46 / 50

What will be the output if we compare "ten" and 10 with less then comparison operator( "ten" <10)?

47 / 50

Which of the following method checks if its argument is not a number?

48 / 50

What is defination of an undefined value in JavaScript?

49 / 50

Find output of below Javascript addition code
document.write("1 plus 1 is " + 1 + 1);

50 / 50

What is the result of: [] + [] in JavaScript?

Your score is

The average score is 2%

0%

Scroll to Top