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

Requirements

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

var x = 10;
// add code here
console.log( x );

Demo

var x = 10;
x -= 5;
console.log( x );

Result