Skip to main content
seanmcp.com

Note #23


Pop quiz: What does the following evaluate to in JavaScript?

Object.keys('hmm...').length

Answer: 6. Here JS treats the string as a type of array which itself is a type of object. Who knew!