Coding for kids Java script lighthearted and playful
Table of Contents
Toggle- Numbers in JavaScript look like this: 5;
- Strings are used to represent text. Your name can be represented as a string in JavaScript, as can your email address example: this is a string
- Booleans are values that can be true or false.
- javascript lets you perform basic mathematical operations like addition, subtraction, multiplication, and division. To make these calculations, we use the symbols +, -, *, and /, which are called operators.
- To create a new variable, use the keyword var, followed by the name of the variable. A keyword is a word that has special meaning in JavaScript. In this case, when we type var, JavaScript knows that we are about to enter the name of a new variable. For example, here’s how you’d make a new variable called nick: var abhi;
- To give the variable a value, use the equal sign: var age = 12; undefined
HTML TAG FOR JAVA SCRIPT
<html lang=“en“>
<head>
<title>JavaScript</title>
<script> document.write(“Hello World <br><br>”);
document.write(“<i><b>Hello from Vista Academy<b></i>”);
</script>
</head>
<body> <h1>This my java script</h1> </body> </html>