-
[JavaScript_codecademy] VARIABLESLanguage/JavaScript 2022. 9. 1. 19:09
Nice work! This lesson introduced you to variables, a powerful concept you will use in all your future programming endeavors.
Let’s review what we learned:
- Variables hold reusable data in a program and associate it with a name.
- Variables are stored in memory.
- The var keyword is used in pre-ES6 versions of JS.
- let is the preferred way to declare a variable when it can be reassigned, and const is the preferred way to declare a variable with a constant value.
- Variables that have not been initialized store the primitive data type undefined.
- Mathematical assignment operators make it easy to calculate a new value and assign it to the same variable.
- The + operator is used to concatenate strings including string values held in variables.
- In ES6, template literals use backticks ` and ${} to interpolate values into a string.
- The typeof keyword returns the data type (as a string) of a value.
'Language > JavaScript' 카테고리의 다른 글
Value Types and Reference Types (0) 2022.09.22 문자열을 배열로 변환, 배열을 문자열로 변환, Spread Operator (0) 2022.09.22 단축 평가 값(short circuit evaluation) (0) 2022.09.05 JavaScript 세미콜론 가이드 (1) 2022.09.02 [JavaScript_codecademy] INTRODUCTION TO JAVASCRIPT (0) 2022.09.01