How are elements treated in the HTML DOM?
What is the purpose of the + operator?
Which property of the Window object represents the content displayed in the window?
What is the output of the following code?
<script>
var x = "abc dbc daabcab cd aabc";
var y = x.indexOf("aabc");
document.write(y);
</script>
What will be the output of the following JavaScript code?
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = Number(true);
</script>
What is the output of the following code?
function fun(a,b){
var c;
c=a+b;
return c;
}
var result;
result=fun(0,24);
window.alert("result "+result)
What will be the output of the following JavaScript code?
let a = 4;
let b = 1;
let c = 0;
if (a == b) {
console.log(a);
} else if (a == c) {
console.log(a);
} else {
console.log(c);
}
When should you pass a function instead of an object to this.setState?
The purpose of the bitwise OR operator (|) is to: