Programming Code Center(PCC)
[JS]

(PCC)::[How-to-use-JavaScript-numbers-and-strings]::[js]

File Name : index.html

<!DOCTYPE html>
<html>
<body>

<h2>JavaScript Variables</h2>

<p>Strings are written with quotes.</p>
<p>Numbers are written without quotes.</p>

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

<script>
var pi = 3.14;
var person = "John Doe";
var answer = 'Yes I am!';

document.getElementById("demo").innerHTML =
pi + "<br>" + person + "<br>" + answer;
</script>

</body>
</html>


Output :

JavaScript Variables

Strings are written with quotes.

Numbers are written without quotes.