HTML and CSS Reference
In-Depth Information
10. Create a string prototype that can be used to create italic, Verdana font, point
size 26 text.
11. Calculate the circumference of a circle using the Math object.
12. Create a two-dimensional array consisting of numbers representing costs. After
creating the array, print out the values with a sales tax of 9 percent added to
each cost.
13. Write a JavaScript program that uses the Array and Math objects. Create an
array of five sayings; for example, “ A stitch in time saves 9,” or “Too many cooks
spoil the broth.” Each time the Web page is visited, print a random saying.
14. a. Use the Date object to print today's date in this format:
Today is Friday, December 17, 2010.
b. Calculate and display the number of days until your next birthday.
c. Create a prototype for the Date object that will print the months starting at 1
instead of 0.
15. a. Create a String object containing “Jose lived in San Jose for many years.”
b. Find the index for the second Jose .
16. Print 58.5678567 in an alert box with only two numbers to the right of the dec-
imal point. Use the toFixed() method.
Search WWH ::




Custom Search