Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Task - Checking Age Eligibility | Conditional Statements
Introduction to JavaScript
course content

Зміст курсу

Introduction to JavaScript

Introduction to JavaScript

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

book
Task - Checking Age Eligibility

Завдання

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 desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 2
toggle bottom row

book
Task - Checking Age Eligibility

Завдання

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 desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 2
Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Ми дуже хвилюємося, що щось пішло не так. Що трапилося?
some-alt