Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
What are Variables? | Data Types and Variables
Introduction to JavaScript (staging)
course content

Зміст курсу

Introduction to JavaScript (staging)

Introduction to JavaScript (staging)

1. Introduction
2. JavaScript syntax
3. Data Types and Variables

What are Variables?

What are Variables?

Variables are the memory locations that are used to store data. In JavaScript, we use the let, const, and var (var is not used now) keywords to declare a variable.

By using let we can re-assign the value to a variable. Values can not be reassigned if they are created using const.

The following statement creates a variable named message.

1
let message;
copy

Now we can assign some data to the variables by using the assignment operator sign (=), for example.

12345
let message; message = 'Hello'; // or you can do it in one line as well like this // let message = 'Hello'; console.log(message);
copy

Завдання

Declare a variable named numberOfStudents and assign the value 100 and display it on the console.

Завдання

Declare a variable named numberOfStudents and assign the value 100 and display it on the console.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

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

What are Variables?

What are Variables?

Variables are the memory locations that are used to store data. In JavaScript, we use the let, const, and var (var is not used now) keywords to declare a variable.

By using let we can re-assign the value to a variable. Values can not be reassigned if they are created using const.

The following statement creates a variable named message.

1
let message;
copy

Now we can assign some data to the variables by using the assignment operator sign (=), for example.

12345
let message; message = 'Hello'; // or you can do it in one line as well like this // let message = 'Hello'; console.log(message);
copy

Завдання

Declare a variable named numberOfStudents and assign the value 100 and display it on the console.

Завдання

Declare a variable named numberOfStudents and assign the value 100 and display it on the console.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

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

What are Variables?

What are Variables?

Variables are the memory locations that are used to store data. In JavaScript, we use the let, const, and var (var is not used now) keywords to declare a variable.

By using let we can re-assign the value to a variable. Values can not be reassigned if they are created using const.

The following statement creates a variable named message.

1
let message;
copy

Now we can assign some data to the variables by using the assignment operator sign (=), for example.

12345
let message; message = 'Hello'; // or you can do it in one line as well like this // let message = 'Hello'; console.log(message);
copy

Завдання

Declare a variable named numberOfStudents and assign the value 100 and display it on the console.

Завдання

Declare a variable named numberOfStudents and assign the value 100 and display it on the console.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

What are Variables?

Variables are the memory locations that are used to store data. In JavaScript, we use the let, const, and var (var is not used now) keywords to declare a variable.

By using let we can re-assign the value to a variable. Values can not be reassigned if they are created using const.

The following statement creates a variable named message.

1
let message;
copy

Now we can assign some data to the variables by using the assignment operator sign (=), for example.

12345
let message; message = 'Hello'; // or you can do it in one line as well like this // let message = 'Hello'; console.log(message);
copy

Завдання

Declare a variable named numberOfStudents and assign the value 100 and display it on the console.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 3. Розділ 1
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt