Answer the following statements true (T) or false (F)
1. The bubble sort can only sort in ascending order.
2. The sort() method is valuable because it keeps elements of parallel arrays In the correct order.
3. When JavaScript arrays are passed to a function, they are passed by reference.
4. The type of sort routine that, if sorting from smallest to largest, will end up with the smallest item in the first place after the first pass is the bubble sort.
5. If the highest index value in an array is N, to complete a selection sort, N – 1 passes must be made.
1. False
2. False
3. True
4. False
5. True
You might also like to view...
The HTML5 document shown in Figure 11.27 contains a canvas element and JavaScript that display an image, tree.png, on the canvas.
Fill in the blanks (i)-(iii) to complete the script.
Figure 11.27. Script to be completed
On a network, users with Read/Write permission can edit and delete files
Indicate whether the statement is true or false
Font size is measured in ________
A) centimeters B) pixels C) points D) millimeters
Use a numbered list for all of the following EXCEPT ________
A) a random list of items B) steps in a procedure C) a logical progression in the content D) a sequential list