Use the -= operator to subtract a value of 5 from the variable x. - Javascript Operator

Javascript examples for Operator:Quiz

Description

Use the -= operator to subtract a value of 5 from the variable x.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
var x = 10;/*from w  w w . j a  v  a2 s.c  om*/
x -= 5;
document.getElementById("demo").innerHTML = x;
</script>

</body>
</html>

Related Tutorials