Let's see who can solve the Javascript problem
Consider the following arays. What gets logged in various sorting conditions.
const arr1 = [ ' x ', ' y ', ' z '] ;
const arr2 = [ ' y ' , ' z ' , ' x ' ] ;
console.log (
arr1.sort() == arr1,
arr2.sort() == arr2,
arr1.sort() == arr2.sort()
} ;
Options are :
a ) true true false
b ) true true true
c ) false false false
d ) true false true
Try to give an explanation
Answers
Answered by
0
Answer:
If I am not wrong the answer should be /d/ ..
Because,
Explanation:
const arr1 and 2 are inversing thorough the array and the sort downside also represents them.
.
.
.
Hope you like it.
If yes then mark me brainliest.
Answered by
0
Explanation:
d ) true false true .....
Hope it will useful
Similar questions