Introduction to JavaScript

Einrichtung

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

Wir haben die Materialien überprüft, dennoch können Fehler vorkommen. Der Inhalt dient ausschließlich Bildungszwecken, daher verwende ihn auf eigene Verantwortung und überprüfe ihn bei Bedarf mit anderen Quellen.

✨ Frag Lara — deine KI-Lernpartnerin

Entsperre personalisierte Lernunterstützung. Lara kann Lektionen erklären, Themen zusammenfassen und deine Lernfragen beantworten — verfügbar ab dem Go-Tarif.


Lara hilft dir, schneller zu lernen — exklusiv für ReadyTools Go-, Plus- und Max-Mitglieder.

Verfolge deinen Fortschritt 🚀

Lerne einfacher, indem du deinen Fortschritt kostenlos verfolgst.