<!DOCTYPE html>
<html>
<head>
  <title>JavaScript Syntax</title>
</head>
<body>

 
<script>
var x = 5;
var y = 10;
var sum = x + y;

document.write("x + y = ",sum); // Prints variable value
</script>
  
</body>
</html>
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.