Mental models for JavaScript Beginners

This is for anybody who is starting with coding, in JavaScript. And needs some mental model representations of those robotic statements.

Lukas Fecko
1 min readNov 9, 2021

We have browser. Imagine him as an eater. And he wears, onto himself, HTML and CSS. Like clothes. From wardrobe. Those are more static.

Now, then he goes to a last place, and that’s JavaScript. He takes the paper (where JavaScript is written) and slowly starts to peel statements after statements.

Okay, so he eats statements. And one by one, do something after it with the clothing he has on.

Now. If he gets stuck, because some statement wasn’t understood properly (didn’t taste him) he would spit out, (an error).

And wouldn’t do anything more. That’s how it works.

But he is kind, and the interpreter (compiler) the mouth of our browser, would also tell you what didn’t taste to him. Or what wasn’t good there. Which is kinda polite, and nice if you asked me.

Browser: “This sucks,”
You: “What line?”
Interpreter + browser: “The 43 was horrible. There, something got stuck in my teeth!”

Okay another part.

It seems like, he calls it commands, and statements, interchangeable. Which is odd. Confuses me a bit. HIm I mean him here https://javascript.info/hello-world.

I quite don’t like this, learning. Or my face doesn’t like this learning that way. Understanding it, actually.

There is something sour, that my interpreter is showing me now.

Bye for now,

Luke

--

--

Lukas Fecko

Just me. Two more characters because medium wanted to! What's your problem medium? ‘Just me’, sounds fine to me!