Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Task - Checking Age Eligibility | Conditional Statements
Introduction to JavaScript
course content

Kursinhalt

Introduction to JavaScript

Introduction to JavaScript

1. Getting Started
2. Manipulating Data
3. Conditional Statements

book
Task - Checking Age Eligibility

Aufgabe

Swipe to start coding

In this task you will write a small JavaScript program that checks if a person is old enough to drive.

  • Create a variable age and assign it a random number (e.g., 18).
  • Write a console.log statement which outputs:
    • "The user is old enough to drive: true" if age is 18 or older.
    • "The user is old enough to drive: false" if age is less than 18.
Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 3. Kapitel 2
toggle bottom row

book
Task - Checking Age Eligibility

Aufgabe

Swipe to start coding

In this task you will write a small JavaScript program that checks if a person is old enough to drive.

  • Create a variable age and assign it a random number (e.g., 18).
  • Write a console.log statement which outputs:
    • "The user is old enough to drive: true" if age is 18 or older.
    • "The user is old enough to drive: false" if age is less than 18.
Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 3. Kapitel 2
Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
Wir sind enttäuscht, dass etwas schief gelaufen ist. Was ist passiert?
some-alt