Today I made a small mistake and accidentally called something similar to this:
myVariable - length
And as I hit return on my keyboard, I already saw my foolish mistake. The property access I did was not valid but a calculation with a not defined variable called
length. Then I saw the output:
myVariable - length -3
What? How did that happen? Did I declare
length by mistake as a variable? Why does it not throw an error? Or - wait for a second - is this available as a property on the
window.length exists. And as I apparently did not know anything about its existence, I asked the best online resource about it - the Mozilla Developer Network web docs.
Returns the number of frames (either
<iframe>elements) in the window.
Yes, it exists. Now you know too.
Written by Eric Zieger (@thezieger) who is a Frontend Developer currently working for powercloud GmbH.