반응형
https://www.w3schools.com/js/js_statements.asp
JavaScript Statements
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com
가볍게 봐도 될꺼 같지만 알아두는 것도 괜찮다
1. 문장끝엔 세미클론;
2. 여백이 가능하다
3. 키워드 단어는 변수로 불가능하다.
JavaScript Keywords
JavaScript statements often start with a keyword to identify the JavaScript action to be performed.
Our Reserved Words Reference lists all JavaScript keywords.
Here is a list of some of the keywords you will learn about in this tutorial:
KeywordDescription
var | Declares a variable |
let | Declares a block variable |
const | Declares a block constant |
if | Marks a block of statements to be executed on a condition |
switch | Marks a block of statements to be executed in different cases |
for | Marks a block of statements to be executed in a loop |
function | Declares a function |
return | Exits a function |
try | Implements error handling to a block of statements |
JavaScript keywords are reserved words. Reserved words cannot be used as names for variables.
728x90
'JavaScript' 카테고리의 다른 글
퇴근 후 JS - const (0) | 2023.03.17 |
---|---|
퇴근 후 JS - Variables ( let, const) (0) | 2023.03.17 |
퇴근 후 JS- 데이터 표현 방법(innerHTML, console.log(), alert()document.write(). (0) | 2023.03.16 |
퇴근 후 JS-Tutorial 1(w3schools) (0) | 2023.03.16 |
JavaScript-날짜, 시간 포맷 (0) | 2023.03.13 |