Java script
Now that we have learned about the foundation of web design, and how to interpreted and apply HTML code; we will now learn about java script. Unlike HTML code java script is known as a programming and scripting language. Java script is can be used to manipulate websites through, inserting a script into an html document. The script provides instructions to web browsers and instructs, it as to how to display the website and at what point to. There are some similarities between HMTL and java script; as it relates to how the script is written.
`
<script> This is to start to write your script. Alternatively you can also
inject java script into your html document, by using the following
<script src="file.js"> Replace the word file with the name of your
java script file.</>
​
Variables- are used to temporarily store units, that hold data. The process of
naming a variable is called declaration. A variable can be name anything. To declare a variable you would use the var name of your variable;
alert(" !"); This statement can be used to create display a pop up message.
​
Java naming rules
​
-
Camel case uses a naming convention that use , lowercase followed by an uppercase letter.
-
names must begin with a letter or a - or $
-
numbers and unicode can be used after the first character.
-
names are case sensitive: for example numOfTurns is not equaled to NumOFTurns
​
​