Introduction to JavaScript

Configuración

Hello friend! 👋 Welcome to your JavaScript journey! JavaScript is a fun programming language that makes websites interactive – buttons that click, games, animations, and much more!

Together with HTML (the structure) and CSS (the style), JavaScript is one of the three main tools for building websites. It takes care of the 'behavior' – what happens when you click or type.

What Exactly is JavaScript?

JavaScript (often called JS) is a language that runs in web browsers. It lets you change the page without reloading, show pop-ups, check forms, and talk to servers.

A Very Short History

JavaScript was created in 1995 by Brendan Eich in just 10 days! It was first called Mocha, then LiveScript, and finally JavaScript. Today it’s one of the most popular languages in the world.

Where Does JavaScript Run?

Everywhere! 😄

  • In web browsers (Chrome, Firefox, Safari, Edge) – the most common place.
  • On servers with Node.js (for building backends).
  • Even in apps on phones and computers!

How to Add JavaScript to HTML

There are two simple ways:

Inline – directly in the HTML file

Put your code inside <script> tags.

External – in a separate file (recommended)

Create a file called script.js and link it.

Basic Rules (Syntax)

  • JavaScript cares about big and small letters (case-sensitive).
  • Statements usually end with a semicolon (;).
  • Comments: // for one line, /* */ for many lines.
  • Code runs from top to bottom.

Quick Quiz – One Easy Question

Hemos revisado y comprobado los materiales, pero aún pueden existir errores. El contenido se ofrece únicamente con fines educativos, así que úsalo bajo tu propia responsabilidad y verifica con otras fuentes si es necesario.

✨ Pregunta a Lara — tu compañera de estudio con IA

Desbloquea soporte de aprendizaje personalizado. Lara puede explicar lecciones, resumir temas y responder tus preguntas — disponible desde el plan Go y superiores.


Lara te ayuda a aprender más rápido — exclusivo para los miembros ReadyTools Go, Plus y Max.

Sigue Tu Progreso 🚀

Aprende más fácilmente siguiendo tu progreso completamente gratis.