λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°

✏️/JavaScript

[JavaScript] λ³€μˆ˜(Variable) / μ’…λ₯˜

πŸ”— λ³€μˆ˜(Variable)λž€?

 

 λ³€μˆ˜λž€ 데이터λ₯Ό μ €μž₯ν•˜λŠ” μž₯μ†Œλ₯Ό μ˜λ―Έν•œλ‹€.

 

 

πŸ”— λ³€μˆ˜ μ„ μ–Έ 방법

 

  • var
  • let
  • const
 

[JavaScript / ES6] ES6 문법 정리

πŸ”— const, let πŸ“Œ var VS const, let  var은 ν•¨μˆ˜ μŠ€μ½”ν”„μ΄λ‹€.  const, let은 블둝 μŠ€μ½”ν”„μ΄λ‹€. λ”°λΌμ„œ {블둝} λ°–μ—μ„œ λ³€μˆ˜μ— μ ‘κ·Όν•  수 μ—†λ‹€. πŸ“Œ const VS let  let은 λ³€μˆ˜μ— μž¬ν• λ‹Ήμ΄ κ°€λŠ₯ν•˜λ‹€. λ”°λΌμ„œ λ‹€λ₯Έ..

devjindev.tistory.com

 

πŸ”— λ³€μˆ˜ μ’…λ₯˜

 

  • μ „μ—­ λ³€μˆ˜ : 전체 μ˜μ—­μ—μ„œ μ‚¬μš© κ°€λŠ₯ ν•œ λ³€μˆ˜
  • 지역 λ³€μˆ˜ : 정해진 μ˜μ—­ λ‚΄μ—μ„œλ§Œ μ‚¬μš© κ°€λŠ₯ ν•œ λ³€μˆ˜
  • 맀개 λ³€μˆ˜ : ν•¨μˆ˜ μ™ΈλΆ€μ—μ„œ λ‚΄λΆ€λ‘œ 데이터λ₯Ό 전달할 λ•Œ μ‚¬μš©ν•˜λŠ” λ³€μˆ˜
  • 멀버 λ³€μˆ˜ : 클래슀 λ‚΄λΆ€μ—μ„œ λ§Œλ“€μ–΄μ§€λ©°, κ°μ²΄μ—μ„œ μ‚¬μš©ν•˜λŠ” 정보λ₯Ό λ‹΄λŠ” λ³€μˆ˜ => this

 


πŸ’‘ 같이 λ³΄λ©΄ μ’‹μ„ Post

 

[JavaScript] μ—°μ‚°μž(Operator) / μ’…λ₯˜

πŸ”— κΈ°λ³Έ 사칙 μ—°μ‚°μž + , - , * , / , % πŸ”— λ¬Έμžμ—΄ μ—°μ‚°μž + : λ¬Έμžμ—΄ ν•©μΉ˜κΈ° ex) '감' + '자' => '감자' πŸ”— 볡합 λŒ€μž… μ—°μ‚°μž += : κΈ°μ‘΄ λ³€μˆ˜ 값에 값을 λ”ν•˜κΈ° -= : κΈ°μ‘΄ λ³€μˆ˜ 값에 값을 λΉΌκΈ° *= : κΈ°μ‘΄ λ³€

devjindev.tistory.com