
Using variables and operators
This piece of code shows you how to create a JavaScript script block using the <script> tag. You can see how it’s possible to create a variable and store a piece of information in it as a value. It shows you how you can use operators like the arithmetic or assignment operators to store text and numbers in your variable. You can use the alert function to display the values in your variables.
See the Pen M2 CS Using variables and operators by Walker Books UK (@walkerbooks) on CodePen.