Logo

Javascript Questions Set 189:

Quiz Mode

JavaScript code can be call by using a 

1
2
3
4

Solution:

Which of the following are common HTML events?

1
2
3
4

Solution:

var str = "Apple, Banana, Kiwi"

var res = str.slice(7, 13); 

document.write(res);

1
2
3
4

Solution:

What function is used to extract arguments from the search property of a URL?

1
2
3
4

Solution:

Name the prop used to determine whether the component should have the active class applied

1
2
3
4

Solution:

What will be the output of the following JavaScript code?

var add = new Function("num1", "num2", "return num1 + num2");

document.writeln(add(2, 5));

1
2
3
4

Solution:

When a program contains extensive use of event handlers, which of the following is often necessary?

1
2
3
4

Solution:

Which of the following JavaScript methods can be used to select HTML elements based on the value of their name attributes?

1
2
3
4

Solution:

Let p be a function that returns a function. The returned function takes an exponent e and returns b^e, where b is the argument passed to p.

Let z = p(0).

What is the value of console.log(z(0))?

1
2
3
4

Solution:

Which of the following statements about the for...in loop is correct?

1
2
3
4

Solution: