๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’™ ์˜์ƒ๋ฆฌ๋ทฐ

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ 2, 3. ์ฝ˜์†”์— ์ถœ๋ ฅ, script async ์™€ defer์˜ ์ฐจ์ด์  ๋ฐ ์•ž์œผ๋กœ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๊ณต๋ถ€ ๋ฐฉํ–ฅ | ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœ์ž ์ž…๋ฌธํŽธ (JavaScript ES5+)

by widely design 2021. 7. 23.

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ 2. ์ฝ˜์†”์— ์ถœ๋ ฅ, script async ์™€ defer์˜ ์ฐจ์ด์  ๋ฐ ์•ž์œผ๋กœ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๊ณต๋ถ€ ๋ฐฉํ–ฅ | ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœ์ž ์ž…๋ฌธํŽธ (JavaScript ES5+)

 

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ 3. ๋ฐ์ดํ„ฐํƒ€์ž…, data types, let vs var, hoisting | ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœ์ž ์ž…๋ฌธํŽธ (JavaScript ES5+)

 

 

 

- 'use strict';

 : ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋งจ ์•ž์— ๋„ฃ์–ด์ฃผ๋ฉด ์˜ค๋ฅ˜๊ฐ€ ๋‚˜๋ฉด ์•Œ๋ ค์ฃผ๋Š” ๋ช…๋ น 

 

- ๋ณ€์ˆ˜ (variable)

  ex) let (added in ES6)

 

- hosting

  : ์–ด๋””์— ์„ ์–ธํ–ˆ๋Š๋ƒ ์ƒ๊ด€์—†์ด ์„ ์–ธ์„ ํ•ญ์ƒ ๊ฐ€์žฅ ์œ„๋กœ ๋Œ์–ด์˜ฌ๋ ค์คŒ 

 

- constants (≠๋ณ€์ˆ˜)

  :  ํ•œ ๋ฒˆ ํ• ๋‹นํ•˜๋ฉด ๊ฐ’์ด ์ ˆ๋Œ€ ๋ฐ”๋€Œ์ง€ ์•Š์Œ

  ex) const

 

- C์–ธ์–ด์˜ ๊ฒฝ์šฐ

  short, int, long : ์ •์ˆ˜ ํ• ๋‹นํ•  ๋•Œ ์‚ฌ์šฉ

  float, double, return : ์†Œ์ˆ˜์  ํ• ๋‹นํ•  ๋•Œ ์‚ฌ์šฉ

  โ€ป ๋ฐ์ดํ„ฐ์˜ ํฌ๊ธฐ์— ๋”ฐ๋ผ ๊ฒฐ์ •๋˜๊ธฐ๋„ ํ•œ๋‹ค.

but,

- ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์—๋Š” nuber ํ•˜๋‚˜๋กœ ํ•ด๊ฒฐํ•œ๋‹ค!

  number์ด๋ผ๊ณ  ์„ ์–ธํ•  ํ•„์š”๋„ ์—†๋‹ค.

  ex) let a = 12;    let a = 1.2;

 

- timescript

  let a: number =12;

  let a: number =1.2;

๋Œ“๊ธ€