Javascript - Write program to display the sum of 10 + 5, using two variables x and y.

Requirements

Write program to display the sum of 10 + 5, using two variables x and y.

Hint

You can define the two variables as

var x;
var y;

Use the addition operator (+).

Demo

var x = 10;
var y = 5;
console.log( x + y );

Result

Related Exercise