Write a JavaScript code fragment that obtains five numbers from text fields, stores them in an array, uses the sort func
Posted: Fri May 20, 2022 10:35 am
Write a JavaScript code fragment that obtains five numbers from text fields, stores them in an array, uses the sort function to sort it into descending numerical order and displays the sorted array in a presentation tag on the HTML page from which the script was invoked. All interaction with the document object model should be done using JQuery. You should assume that the input fields have id attributes idi, id2, id3, id4 and id5 and the presentation tag has the id attribute sorted.