본문 바로가기

JavaScript

퇴근 후 JS - Statements

반응형

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