It’s fairly common these days to think of JavaScript as a sort of “assembly language for the web”.
That's definitely a simile, not a metaphor.
Upon seeing that article I was like "Oh yeah, I get the two confused all the time WTF?!"