HTML and CSS Reference
In-Depth Information
Exercises
1. Create a script that uses the three primitive data types and prints output for
each type. In the same script, print the following:
She cried, " Aren't you going to help me? "
2. Go to http://www.unicode.org/charts/PDF/U2600.pdf and find a symbol. Use Java-
Script to display one of the symbols in a larger font (+5).
3. Write a script that displays the number 234 as an integer, a floating-point num-
ber, an octal number, a hexadecimal number, and the number in scientific nota-
tion.
4. When is it necessary to use the var keyword?
5. Write a script that contains four variables in the head of the document: The first
one contains your name, the second contains the value 0, the third one is
declared but has no value, and the last contains an empty string. In the body of
the document, write another script to display the type of each (use the typeof
operator).
Search WWH ::




Custom Search