Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
var x = 10;
x *= 5;
document.getElementById(“demo”).innerHTML = x;
</script>

What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
var x = 10;
x *= 5;
document.getElementById(“demo”).innerHTML = x;
</script>
a) 10
b) 5
c) 50
d) Error

Answer: c
Explanation: The *= operator is a shorthand expression for multiplication of a particular number. It is a combination of two operators * and = .

Join The Discussion