Question: Create a JavaScript file named as your student ID (101010101.js) and perform the following: a. Prompt user to enter a string b. Display the content
Create a JavaScript file named as your student ID (101010101.js) and perform the following:
a. Prompt user to enter a string
b. Display the content of the string as an h2 element in the div container created above.
c. Loop through each character/digit of the string and store the ASCII value of each as an element in an array.
d. Display array content separated by a hyphen - in a new h2 element in the div container created above.
e. Sort the values of the array in ascending order and display new content in a new h2 element in the div container created above.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
