The HTML element used to include images is ________
What does the following code prints?
<script>
var x=45.345;
document.write(x.toExponential(2))
</script>
What is the method used to create an element in the HTML DOM?
Find the output of the following code:
for(var i=0;i<5;i++){
document.write("Hello");
i+=3;
}
What will be the output of the following JavaScript code?
int a=1;
if(a!=null)
return 1;
else
return 0;
What is the output of the following code?
const array1 = ['a', 'b', 'c', 'd', 'e'];
console.log(array1.copyWithin(0, 3, 4));
What will be the output of the following JavaScript code?
<p>The result of adding "5" + 2 + 3:</p>
<p id="demo"></p>
<script>
x = "5" + 2 + 3;
document.getElementById("demo").innerHTML = x;
</script>
The purpose of the return statement in a function is
What will be the output of the following code snippet?
function solve(arr, rotations) { if(rotations == 0) return arr; for(let i=0; i<rotations; i++){ let element = arr.pop(); arr.unshift(element); } return arr; } solve([44, 1, 22, 111], 5);
Predict the output:
var printHello = function() {
console.log("I am printHello function");
};
function printHelloAndHi(func) {
func();
console.log("I am printHelloAndHi function");
}
printHelloAndHi(printHello);