Basic JavaScript (4/111) | Assigning the Value of One Variable to Another | freeCodeCamp

Опубликовано: 24 Декабрь 2020
на канале: Stral Tech
830
3

Basic JavaScript (4/111) | Assigning the Value of One Variable to Another | freeCodeCamp

Full playlist 👉    • Basic JavaScript (1/111) | Comment Yo...  

After a value is assigned to a variable using the assignment operator, you can assign the value of that variable to another variable using the assignment operator.

var myVar;
myVar = 5;
var myNum;
myNum = myVar;
The above declares a myVar variable with no value, then assigns it the value 5. Next, a variable named myNum is declared with no value. Then, the contents of myVar (which is 5) is assigned to the variable myNum. Now, myNum also has the value of 5.

Assign the contents of a to variable b.


Смотрите видео Basic JavaScript (4/111) | Assigning the Value of One Variable to Another | freeCodeCamp онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Stral Tech 24 Декабрь 2020. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 830 раз и оно понравилось 3 посетителям.