Question: Setup an HTML file with a script tag at the proper location. Then, complete the following using JavaScript within this script tag: 1 . Write

Setup an HTML file with a script tag at the proper location. Then, complete the following using JavaScript within this script tag:
1. Write a function in JavaScript that can calculate the factorial of a number. Recall that the factorial of a number n is given as:
f(n)= n * f(n-1)
2. Call this function and print the values of factorial of 5 and 6. Output the values on the console.
3. Create a simple HTML form. This form must have two input fields and a submit button. Style the form properly using Bootstrap.
4. Create a variable in JavaScript and set its value to the concatenation of the first names of all your group members. For example, Stu Dent One where the first names of the three group members are Stu,Dent and One. You must use string templates for doing this.
5. Using JavaScript, enable this functionality: whenever the submit button is clicked, your code must set the value of the first input field of the form to the string you created in Part 4 above.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!