Page 1 of 1

1. Which of the following sorts array in a descending order? Numbers = [ 7, 23, 6, 74]; Numbers.sort(function(a,b) {retu

Posted: Sun May 15, 2022 12:13 pm
by answerhappygod
1. Which of the following sorts array in a descending
order?
Numbers = [ 7, 23, 6, 74];
Numbers.sort(function(a,b) {return a-b})
Numbers.sort(function(a,b) {return b-a})
None of the above
2. A JavaScript variable name must begin with a $ sign.
3. What JavaScript method can be used to send a form for
validation prior to submitting it?
onClick
onsubmit
onload
None of the above
4. Which of the following can be used to return more than one
value from a function in JavaScript?
Array
String
Integer
None of the above