λ³€μˆ˜

0

javascript

λͺ©λ‘ 보기
1/34
post-thumbnail
post-custom-banner

πŸ“λ³€μˆ˜

λ³€μˆ˜λŠ” λ³€ν•  수 μžˆλŠ” 값을 의미 ν•©λ‹ˆλ‹€.

πŸ“λ³€μˆ˜μ„ μ–Έ

λ³€μˆ˜κ°€ 자리 μž‘λŠ” λ™μž‘

πŸ“Œ λ³€μˆ˜ μ„ μ–Έκ³Ό ν• λ‹Ήν•˜λŠ” 방법

let myname;  // λ³€μˆ˜ μ„ μ–Έ(let λ³€μˆ˜λͺ…)
myname = 'μ—°μ£Ό' ; // λ³€μˆ˜μ— λ¬Έμžμ—΄ 'μ—°μ£Ό' ν• λ‹Ή 
let myname = 'μ—°μ£Ό'; // λ³€μˆ˜μ„ μ–Έκ³Ό 할당을 ν•¨κ»˜ ν•œκ²ƒ 

λ³€μˆ˜λ₯Ό μ„ μ–Έν•˜λ©΄ λ³€μˆ˜λͺ…을 λ‹€λ₯Έκ³³μ—μ„œ λ³€μˆ˜μ˜κ°’μ„ μ‚¬μš© ν•  수 μžˆλ‹€.!!

let sum = 1;
sum = snm + 2;
sum = sum + 3;
sum = sum + 4;
sum = 10 

πŸ“λ³€μˆ˜μ˜ νƒ€μž…
λ³€μˆ˜λŠ” 각자 νƒ€μž…μ„ 가지고 μžˆμŠ΅λ‹ˆλ‹€.
μ»΄ν“¨ν„°μ—κ²Œ 문자, λ¬Έμžμ—΄(string) 둜 인식 μ‹œν‚€κΈ° μœ„ν•΄μ„œλŠ” ''(μž‘μ€λ”°μ˜΄ν‘œ)μ΄κ±°λ‚˜ ""(ν°λ”°μ˜΄ν‘œ) λ₯Ό μ‚¬μš©ν•˜μ—¬ ν‘œν˜„ ν•˜κ³ ,
숫자(number)λŠ” κ·ΈλŒ€λ‘œ 숫자둜 ν‘œν˜„ ν•©λ‹ˆλ‹€.

profile
πŸ‘©πŸ»β€πŸ’»ν•­μƒλ°œμ „ν•˜μž πŸ”₯

0개의 λŒ“κΈ€