DEV Community

Karl Esi
Karl Esi

Posted on

What is JavaScript?

JavaScript is used to add functionality to web pages. Let me give you an analogy.

Think of a building.

Building being constructed

A building in the real world is like a web page on the internet. It has a skeleton or structure – the framing and foundation of the building (HTML).

It can have pretty walls, windows, and tiles as well that finish it out and make it look nice (CSS).

House tiles

And it can have certain functionality, like being a home, a hospital, or a supermarket (JavaScript).

Elevators of a house

For example, when we press the elevator button, it comes to pick us up. JavaScript would enable this in our analogy.

For more of my free content, be sure to follow me on X.

Happy coding!

Top comments (0)