πŸ“Š JavaScript
Q. What will be the output of the following JavaScript code?
Code:
<p id="demo"></p>
<script>
var js = 10;
js *= 5;
document.getElementById("demo").innerHTML = js;
</script>
  • (A) 10
  • (B) 50
  • (C) 5
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) 50

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

Explanation by: Chandani
The *= operator in javascript is a shorthand expression for the multiplication of a particular number. It is a combination of two operators * and = .

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
163
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
80%
Success Rate