Lab 13: functions


This lab will allow you to work with functions. Write a script that writes a series of identical characters to a page. The function should take 3 parameters:
  1. One to control the number of characters produced (you can assume this number is beween 1 and 30). This should be inputed via prompt.
  2. One to control the type of character that is produced. This should be inputed via prompt.
  3. One booloean parameter controling whether or not the sequence of characters is centered using the < center > tags. This should be inputed using the window.confirm method().

So, if your function is called hrule2(), hrule(8,"%",true) should produce:

%%%%%%%%


Call the function once, using the input given by the user, and once using the values (8,"%",true).
Save your file as lab13.html.