Question: Hello, we are responsible for completing 4.4 but I am confused based on the reference to 4.2. Any help is appreciated :) Exercises Write, test,

Hello, we are responsible for completing 4.4 but I am confused based on the reference to 4.2. Any help is appreciated :)
Exercises Write, test, and debug (if necessary) JavaScript scripts for the problems that fol- low. When required to write a function, you must include a script to test the function with at least two different data sets. In all cases, for testing, you must write an XHTML file that references the JavaScript file. 4.1 Output: A table of the numbers from 5 to 15 and their squares and cubes, using alert. 4.2 Output: The first 20 Fibonacci numbers, which are defined as in the sequence 1, 1, 2, 3, ... where each number in the sequence after the second is the sum of the two previous numbers. You must use document.write to produce the output. 4.3 Input: Three numbers, using prompt to get each. Output: The largest of the three input numbers. Hint: Use the predefined function Math.max. 4.4 Modify the script of Exercise 4.2 to use prompt to input a number n that is the number of the Fibonacci number required as output. 4.5 Input: A text string, using prompt. Output: Either "Valid name" or "Invalid name", depending on whether the input names fit the required format, which is Last name, first name, middle initial where neither of the names can have more than 15 characters
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
