Logo

Javascript Questions Set 29:

Quiz Mode

Which identifier is used to represent a web browser window or frame?

1
2
3
4

Solution:

Which jQuery method is used to add a class attribute to a particular HTML element?

1
2
3
4

Solution:

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

1
2
3
4

Solution:

Cookies were originally designed for what purpose?

1
2
3
4

Solution:

The decodeURIComponent() function is defined by

1
2
3
4

Solution:

What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = Math.abs(-4.5);
</script>

1
2
3
4

Solution:

Write a condition where the if statement is evaluated only if the following condition is satisfied:

x is not equal to 7.

1
2
3
4

Solution:

const filteredevents = ["1","2","3","4"]

const promptedevent = filteredevents.filter(event => event !== "1");

console.log(promptedevent)

1
2
3
4

Solution:

Find the output of the following code:

var text = "abekus";

a = text.charAt(2);

b = text.charAt(4);

if (a === b) {

document.write("same");

}

else {

document.write("different");

}

1
2
3
4

Solution:

In the React component lifecycle, the phase where the component can potentially update and re-render only when a prop or state change occurs is called:

1
2
3
4

Solution: