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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started