The eternal struggle of every developer - trying to remember how to get the damn array length in whatever language you're using. Is it array.size()
? Or array.len()
? Maybe array.length()
? Or just len(array)
?
Your brain goes into full mathematical meltdown trying to remember the correct syntax while Stack Overflow is down. Meanwhile, Python folks are smugly typing len(array)
while Java developers are muscle-memorizing array.length
(no parentheses, because why make it consistent?). And don't get me started on JavaScript with both array.length
and string.length()
.
The true programming interview question should just be "how do you check array length in 5 different languages" - separates the real ones from the Google-dependent coders.