Why JavaScript Sort Doesn't Work Like You Think 🤔 #shorts
288views
000:41
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Pop quiz: What does [10, 2, 1, 21].sort() print?
A) [1, 2, 10, 21]
B) [1, 10, 2, 21]
C) [21, 10, 2, 1]
D) [1, 2, 21, 10]
Watch to find out why the answer catches everyone off guard! 💡
#javascript #programming #coding #learntocode #developer #shorts #webdevelopment