welcome to Learning World,Worlds No.1 dastination for Learning. Stay With Us for New Updates and Follow us On FB and Google+.

Welcome to Free learning World Learning World: JavaScript Programs

Search Here

Tuesday, November 8, 2016

JavaScript Programs

JavaScript Programs

computer program is a list of "instructions" to be "executed" by the computer.
In a programming language, these program instructions are called statements.
JavaScript is a programming language.
JavaScript statements are separated by semicolons.

JavaScript Values:

The JavaScript syntax defines two types of values: Fixed values and variable values.

Fixed values are called literals. Variable values are called variables.

JavaScript Literals
The most important rules for writing fixed values are:

Numbers are written with or without decimals:
coding try this
<!DOCTYPE html>
<html>
<body>

<h1>JavaScript Statements</h1>

<p>Statements are separated by semicolons.</p>

<p>The variables x, y, and z are assigned the values 5, 6, and 11:</p>

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

<script>
var x = 5;
var y = 6;
var z = x + y;
document.getElementById("demo").innerHTML = z;
</script>

</body>

</html>

No comments:

Post a Comment