Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Strings 4/5 | 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

Strings 4/5

Strings are Immutable:

Strings, in JavaScript, are immutable which means that their values cannot be changed once declared.

Let’s try to understand this with an example.

1234
let stringVariable = 'JavaScript'; // changing the value of first character. stringVariable[0] = 'A'; console.log(stringVariable[0]);
copy

The value did not change.

To do so, the usual practice is to create a new string variable with the value that we want to change and attach the parts of the older string to it. In this way, we can change the string,

1234
let str = 'Gi'; // replacing the string G with H str = 'H' + str[1]; console.log(str);
copy

Завдання

A variable name order with the assigned value of go has been given to you. Your task is to change the value go to to and display it.

Завдання

A variable name order with the assigned value of go has been given to you. Your task is to change the value go to to and display it.

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

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

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

Strings 4/5

Strings are Immutable:

Strings, in JavaScript, are immutable which means that their values cannot be changed once declared.

Let’s try to understand this with an example.

1234
let stringVariable = 'JavaScript'; // changing the value of first character. stringVariable[0] = 'A'; console.log(stringVariable[0]);
copy

The value did not change.

To do so, the usual practice is to create a new string variable with the value that we want to change and attach the parts of the older string to it. In this way, we can change the string,

1234
let str = 'Gi'; // replacing the string G with H str = 'H' + str[1]; console.log(str);
copy

Завдання

A variable name order with the assigned value of go has been given to you. Your task is to change the value go to to and display it.

Завдання

A variable name order with the assigned value of go has been given to you. Your task is to change the value go to to and display it.

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

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

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

Strings 4/5

Strings are Immutable:

Strings, in JavaScript, are immutable which means that their values cannot be changed once declared.

Let’s try to understand this with an example.

1234
let stringVariable = 'JavaScript'; // changing the value of first character. stringVariable[0] = 'A'; console.log(stringVariable[0]);
copy

The value did not change.

To do so, the usual practice is to create a new string variable with the value that we want to change and attach the parts of the older string to it. In this way, we can change the string,

1234
let str = 'Gi'; // replacing the string G with H str = 'H' + str[1]; console.log(str);
copy

Завдання

A variable name order with the assigned value of go has been given to you. Your task is to change the value go to to and display it.

Завдання

A variable name order with the assigned value of go has been given to you. Your task is to change the value go to to and display it.

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

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

Strings are Immutable:

Strings, in JavaScript, are immutable which means that their values cannot be changed once declared.

Let’s try to understand this with an example.

1234
let stringVariable = 'JavaScript'; // changing the value of first character. stringVariable[0] = 'A'; console.log(stringVariable[0]);
copy

The value did not change.

To do so, the usual practice is to create a new string variable with the value that we want to change and attach the parts of the older string to it. In this way, we can change the string,

1234
let str = 'Gi'; // replacing the string G with H str = 'H' + str[1]; console.log(str);
copy

Завдання

A variable name order with the assigned value of go has been given to you. Your task is to change the value go to to and display it.

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