Programming Code Center(PCC)
[JS]

(PCC)::[How-to-use-JavaScript-assignment]::[js]

File Name : index.html

<!DOCTYPE html>
<html>
<body>

<h2>Assigning JavaScript Values</h2>

<p>In JavaScript the = operator is used to assign values to variables.</p>

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

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

</body>
</html>

Output :

Assigning JavaScript Values

In JavaScript the = operator is used to assign values to variables.