๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ“Œ Language/Javascript

[JS] iOS ๊ฐœ๋ฐœ์ž๊ฐ€ ์ดํ•ดํ•˜๋Š” JavaScript ๊ธฐ์ดˆ๋ฌธ๋ฒ• (feat. Swift)

by Fomagran ๐Ÿ’ป 2022. 2. 5.
728x90
๋ฐ˜์‘ํ˜•


์•ˆ๋…•ํ•˜์„ธ์š” Foma ๐Ÿ’ป ์ž…๋‹ˆ๋‹ค!

์–ผ๋งˆ ์ „์— ๋ฆฌ์•กํŠธ ๋„ค์ดํ‹ฐ๋ธŒ๋กœ ์ƒˆ๋กœ์šด ํ”„๋กœ์ ํŠธ๋ฅผ ๋งก๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

JavaScript๋ฅผ ๊ณต๋ถ€ํ•˜๋‹ค๋ณด๋‹ˆ Swift๋ž‘ ๋น„์Šทํ•œ ๊ฒƒ๋„ ์žˆ๊ณ  ์•„๋‹Œ ๋ถ€๋ถ„๋„ ๋งŽ๋”๋ผ๊ตฌ์š”.

๊ทธ๋ž˜์„œ ์›๋ž˜ ์ต์ˆ™ํ–ˆ๋˜ Swift๋ฅผ ๊ธฐ์ค€์œผ๋กœ JavaScript์™€ ๋‹ค๋ฅธ ์ ์— ๋Œ€ํ•ด์„œ๋งŒ ์ •๋ฆฌํ•ด ๋ณด๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค!

๋ฐ”๋กœ ์‹œ์ž‘ํ• ๊ฒŒ์š”~


๋ณ€์ˆ˜์™€ ์ƒ์ˆ˜


Swift์—์„  ์ƒ์ˆ˜๋ฅผ let,๋ณ€์ˆ˜๋ฅผ var๋กœ ์“ด๋‹ค.

 

let name = "Fomagran" //์ƒ์ˆ˜
var name = "Fomagran" //๋ณ€์ˆ˜


JavaScript๋Š” ์ƒ์ˆ˜๋ฅผ const,๋ณ€์ˆ˜๋ฅผ let์ด๋ผ๊ณ  ์“ด๋‹ค.

์ด๋ฏธ ์ƒ์ˆ˜ let์— ์ต์ˆ™ํ•ด ์žˆ๋Š” ์ƒํƒœ๋ผ์„œ.. ์‹ค์ˆ˜๋ฅผ ๋งŽ์ด ํ•  ๊ฒƒ ๊ฐ™๋‹ค.

 

const name = "Fomagran" //์ƒ์ˆ˜ 
let name = "Fomagran" //๋ณ€์ˆ˜

์ถœ๋ ฅ


Swift๋Š” ๊ฐ„๋‹จํ•˜๊ฒŒ print, ์•ˆ์— ๋ณ€์ˆ˜๊ฐ€ ์žˆ์œผ๋ฉด \(๋ณ€์ˆ˜)๋กœ ์“ด๋‹ค.

 

print("์•ˆ๋…•ํ•˜์„ธ์š”. ์ €๋Š” \(name) ์ž…๋‹ˆ๋‹ค."


JavaScript๋Š” console.log๋ฅผ ์ด์šฉํ•˜๊ณ  ๋ณ€์ˆ˜๋ฅผ ์ถœ๋ ฅํ•  ๋• `(๋ฐฑํ‹ฑ)์„ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๊ณ  ${๋ณ€์ˆ˜}๋กœ ์“ด๋‹ค.

 

console.log(`์•ˆ๋…•ํ•˜์„ธ์š”. ์ €๋Š” ${name} ์ž…๋‹ˆ๋‹ค.`)

์ž๋ฃŒํ˜•


Swift๋Š” ์ž๋ฃŒํ˜•์„ ๋ณ€์ˆ˜๋‚˜ ๋ฐ˜ํ™˜๊ฐ’ ๋“ฑ์— ๋ช…์‹œํ•  ์ˆ˜ ์žˆ๊ณ , ํ•ด๋‹น ์ž๋ฃŒํ˜•์ด ์•„๋‹ ๊ฒฝ์šฐ ์—๋Ÿฌ๊ฐ€ ๋‚œ๋‹ค.

 

var number:Int = 9 
number = "9" //์—๋Ÿฌ


JavaScript๋Š” ์ž๋ฃŒํ˜•์„ ๋ช…์‹œํ•  ์ˆ˜ ์—†๊ณ , ๋‹ค๋ฅธ ์ž๋ฃŒํ˜•์„ ๋„ฃ์–ด๋„ ๊ดœ์ฐฎ๋‹ค.

๋˜ํ•œ ์ˆซ์ž๊ฐ€ ๋ฌธ์ž๋กœ ๋˜์–ด์žˆ์œผ๋ฉด ์ž๋™์œผ๋กœ ๋ฐ”๋€Œ๊ณ  ์ˆซ์ž์™€ ๋ฌธ์ž๋ฅผ ๋”ํ•˜๋Š” ๋“ฑ ์—„์ฒญ ์ž์œ ๋กœ์šด ํŽธ์ด๋‹ค.

 

let number = 9 number = "9" //OK "3"/"6" = 2 //OK "3" + 1 = 31 //OK

์ฆ๊ฐ€ ๊ฐ์†Œ


Swift๋Š” ++, -- ๊ฐ€ ์—†๊ณ  += ๊ธฐํ˜ธ๋ฅผ ์จ์•ผํ•œ๋‹ค.

 

var number = 1
number += 1


JavaScript๋Š” ++ -- ๋ชจ๋‘ ๊ฐ€๋Šฅํ•˜๋‹ค.

๋’ค์— ์•ž์— ๋ชจ๋‘ ๊ฐ€๋Šฅํ•˜์ง€๋งŒ ์•ž์— ์“ธ ๊ฒฝ์šฐ ๊ฐ’์ด ๋ฐ”๋กœ ํ• ๋‹น๋˜๋Š” ๋ฐ˜๋ฉด์— ๋’ค์— ์“ฐ๋ฉด ๊ฐ’์€ ๋ฐ”๋€Œ์ง€๋งŒ ๊ธฐ์กด๊ฐ’์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

 

let number1 = 1 
let newNumber1 = number1++ //2 
let number2 = 1 
let newNumber2 = ++number //1

์กฐ๊ฑด


Swift๋Š” ์กฐ๊ฑด๋ฌธ์ด๋‚˜ for,while ๋ฃจํ”„์—์„œ ()์•ˆ์— ์กฐ๊ฑด์„ ๋„ฃ์ง€ ์•Š์•„๋„ ๋œ๋‹ค.

 

if n > 0 { ... }


JavaScript๋Š” ๋ฐ˜๋“œ์‹œ ()์•ˆ์— ์กฐ๊ฑด์„ ๋„ฃ์–ด์•ผ ํ•œ๋‹ค.

 

if (n > 0) { ... }

ํ•จ์ˆ˜


Swift๋Š” ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑํ•  ๋•Œ func๋กœ ์‹œ์ž‘ํ•˜๊ณ , ํŒŒ๋ผ๋ฏธํ„ฐ์— ์ž๋ฃŒํ˜•์„ ๋ฐ˜๋“œ์‹œ ๋ช…์‹œํ•ด์•ผ ํ•˜๋ฉฐ, ๋ฐ˜ํ™˜๊ฐ’์ด ์žˆ๋Š์ง€ ์—†๋Š”์ง€,์žˆ๋‹ค๋ฉด ๋ฐ˜ํ™˜๊ฐ’์— ๋Œ€ํ•œ ์ž๋ฃŒํ˜•๋„ ๋ฐ˜๋“œ์‹œ ๋ช…์‹œํ•ด์•ผ ํ•œ๋‹ค.

 

func add(_ n1:Int,_ n2:Int) -> Int { ... }


JavaScript๋Š” function์œผ๋กœ ์‹œ์ž‘ํ•˜๊ณ , ํŒŒ๋ผ๋ฏธํ„ฐ๋‚˜ ๋ฐ˜ํ™˜๊ฐ’์— ์ž๋ฃŒํ˜•์„ ๋ช…์‹œํ•˜์ง€ ์•Š๊ณ  ๋ฐ˜ํ™˜๊ฐ’์ด ์žˆ๋Š”์ง€ ์—†๋Š”์ง€๋„ ์ž‘์„ฑํ•˜์ง€ ์•Š์•„๋„ ๋œ๋‹ค.

 

function add(n1,n2) { ... }

์ˆซ์žํ˜•


Swift๋Š” ์†Œ์ˆ˜์ ์ด ์žˆ๋ƒ ์—†๋ƒ์— ๋”ฐ๋ผ Int,Float,Double๋“ฑ์œผ๋กœ ์ž‘์„ฑํ•œ๋‹ค.

 

let n1:Int = 1 
let n2:Float = 1.1 
let n3:Double = 1.11 
let n4:Int = 1.1 //์—๋Ÿฌ


JavaScript๋Š” ๊ทธ๋ƒฅ ์“ฐ๋ฉด๋จ.

 

const n1 = 1 
const n2 = 1.1
const n3 = 1.11

๋ฌธ์žํ˜•


Swift๋Š” ๋ฌธ์ž์—ด์˜ ์ธ๋ฑ์Šค๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ๋ฐฉ๋ฒ•์ด startIndex,offsetBy ๋“ฑ์„ ์‚ฌ์šฉํ•˜๋Š” ๋“ฑ ๊ฝค ๋ณต์žกํ•˜๋‹ค.

์ด๋ฅผ ์ด์šฉํ•ด์„œ ๋ถ€๋ถ„ ๋ฌธ์ž๋„ ์ถ”์ถœํ•  ์ˆ˜ ์žˆ๋‹ค.

 

let str = "abcdefg" 
//์ฒซ ๊ธ€์ž์—์„œ 2๋ฒˆ์งธ ๊ธ€์ž ์•Œ์•„๋‚ด๋Š” ๋ฒ• 
print(str[str.index(str.startIndex, offsetBy: 2)]) //c 
//2๋ฒˆ์งธ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ์ถ”์ถœํ•˜๋Š” ๋ฒ• 
let startIndex:String.Index = str.index(str.startIndex, offsetBy: 2) 
print(str[startIndex...]) //cdefg


JavaScript๋Š” ์›ํ•˜๋Š” ์ธ๋ฑ์Šค๋ฅผ ๋Œ€๊ด„ํ˜ธ๋กœ ๊ฐ€์ ธ์˜ค๋ฉด ๋˜๊ณ  slice๋ฅผ ์ด์šฉํ•ด์„œ ๋ถ€๋ถ„ ๋ฌธ์ž๋ฅผ ์ถ”์ถœํ•  ์ˆ˜ ์žˆ๋‹ค.

 

const str = "abcdefg" 
//์ฒซ ๊ธ€์ž์—์„œ 2๋ฒˆ์งธ ๊ธ€์ž ๊ฐ€์ ธ์˜ค๋Š” ๋ฐฉ๋ฒ•
print(str[2]) //c 
print(str.slice(2)) //cdefg

๋ฐฐ์—ด

 

Swift๋Š” ๋ฐฐ์—ด ์„ ์–ธ์‹œ ๋ฐฐ์—ด ์•ˆ์— ์–ด๋–ค ์ž๋ฃŒํ˜•์„ ๋‹ด๋Š”์ง€, ๋ช‡ ์ฐจ์› ๋ฐฐ์—ด์ธ์ง€์„ ๋ฐ˜๋“œ์‹œ ๋ช…์‹œํ•ด์•ผ ํ•œ๋‹ค.

๊ฐ’์„ ์ถ”๊ฐ€ํ•  ๋•Œ๋Š” append๋‚˜ insert๋ฅผ ์ด์šฉํ•ด์•ผ ํ•œ๋‹ค.

๋˜ํ•œ ๋ฐฐ์—ด์˜ ๊ธธ์ด๋ณด๋‹ค ์ ๊ฑฐ๋‚˜ ํฐ ๊ฐ’์— ์ ‘๊ทผํ•˜๊ฒŒ ๋˜๋ฉด ์—๋Ÿฌ๊ฐ€ ๋‚œ๋‹ค.

 

๋ฐฐ์—ด์„ ๋ณต์‚ฌํ•˜๋ฉด ๊ฐ’์ด ๋ณต์‚ฌ๋œ๋‹ค.

 

var array:[Int] = [] 
//์ถ”๊ฐ€ 
array.append(10) //[10] 
print(array[1]) //์—๋Ÿฌ 
print(array.remove(at:2)) //์—๋Ÿฌ 
var array2 = array //๊ฐ’ ๋ณต์‚ฌ(์ฐธ์กฐX)


JavaScript๋Š” ์ž๋ฃŒํ˜•,๊ธธ์ด์— ์ƒ๊ด€์—†์ด ๋„ฃ๊ฑฐ๋‚˜ ์‚ญ์ œํ•ด๋„ ๊ดœ์ฐฎ๋‹ค.

๊ฐ’์„ ์ถ”๊ฐ€ํ•  ๋•Œ๋Š” ๋Œ€๊ด„ํ˜ธ ์•ˆ์— ์›ํ•˜๋Š” ์ธ๋ฑ์Šค๋ฅผ ๋„ฃ๊ณ  ๊ฐ’์„ ๋„ฃ์–ด์ฃผ๋ฉด ๋œ๋‹ค.

๋ฐฐ์—ด์„ ๋ณต์‚ฌํ•˜๋ฉด ์ฐธ์กฐ๊ฐ€ ๋œ๋‹ค.

 

let array = new Array() 
//or 
let array = [] 
//์ถ”๊ฐ€
array[0] = 10 //[1] 
//์ž๋™์œผ๋กœ ๋นˆ ๊ณต๊ฐ„์ด ์ƒ๊น€
array[3] = 30 //[ 1, <2 empty items>, 30 ] 
delete array[5] //๋ฒ”์œ„๋ฅผ ๋„˜์–ด๊ฐ€๋„ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š์Œ
let array2 = array //์ฐธ์กฐ๊ฐ€ ๋จ

๊ฐ์ฒด


Swift๋Š” ๊ฐ์ฒด๋ฅผ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด์„œ Struct๋กœ ํ”„๋กœํผํ‹ฐ์™€ ๋ฉ”์†Œ๋“œ๋ฅผ ๋ฏธ๋ฆฌ ๋งŒ๋“ค์–ด ์ฃผ์–ด์•ผ ํ•œ๋‹ค.

 

ํ”„๋กœํผํ‹ฐ์™€ ๋ฉ”์†Œ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ ์‚ญ์ œ๋Š” ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค.

 

struct User { 
	let name:String 
    let age:Int 
    let isMan:Bool 
    func introduce() {
    	print("์•ˆ๋…•ํ•˜์„ธ์š” ์ €๋Š” \(name)์ด๊ณ , ๋‚˜์ด๋Š” \(age)์‚ด ์ž…๋‹ˆ๋‹ค.")
    } 
} 

let user = User(name:"Foma",age:27,isMan:true)
print(user.name) // Foma



JavaScript๋Š” ๋ณ€์ˆ˜์ฒ˜๋Ÿผ ๊ฐ์ฒด๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ๊ณ  ํ”„๋กœํผํ‹ฐ์™€ ๋ฉ”์†Œ๋“œ๋ฅผ ์–ธ์ œ๋“  ์ถ”๊ฐ€ํ•  ์ˆ˜๋„ ์žˆ๊ณ  ์‚ญ์ œํ•  ์ˆ˜๋„ ์žˆ๋‹ค.

๋˜ํ•œ ์ปค์Šคํ…€ ๊ฐ์ฒด๋ฅผ ๋งŒ๋“ค ๋•Œ๋Š” ํ•จ์ˆ˜์™€ ๊ฐ™์ด ๋งŒ๋“ค์–ด์ค€๋‹ค.

 

let user = new Object() 
//or 
let user = {} 
//or 
let user = {
	name:"Foma",
    age:27,
    isMan:true,
    introduce() {
    	console.log(`์•ˆ๋…•ํ•˜์„ธ์š” ์ €๋Š” ${name}์ด๊ณ ,๋‚˜์ด๋Š” ${age}์‚ด ์ž…๋‹ˆ๋‹ค.`) 
    } 
} 
//ํ”„๋กœํผํ‹ฐ ์ถ”๊ฐ€ ๊ฐ€๋Šฅ 
user.country = "Korea" 
//ํ”„๋กœํผํ‹ฐ ์‚ญ์ œ ๊ฐ€๋Šฅ 
delete user.country 
//๋ฉ”์„œ๋“œ ์ถ”๊ฐ€ ๊ฐ€๋Šฅ 
user.sayHi = function() {
	console.log("Hi") 
} 
console.log(user.name) //Foma 
//์ปค์Šคํ…€ ๊ฐ์ฒด
function User(name,age,isMan) {
	this.name = name 
    this.age = age
    this.isMan = isMan 
} 
let user = new User("Foma",27,true) 
console.log(user.name) //Foma

์˜ต์…”๋„ ์ฒด์ด๋‹

 

Swift๋Š” ํ•ด๋‹น ๊ฐ’์ด ์—†์„ ์ˆ˜๋„ ์žˆ๊ณ  ์žˆ์„ ์ˆ˜๋„ ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ๋ฏธ๋ฆฌ '?'๋ฅผ ์ด์šฉํ•ด ๋ช…์‹œํ•˜๋ฉด ์ž๋™์œผ๋กœ ์˜ต์…”๋„ ์ฒด์ด๋‹์ด ํƒ€์ดํ•‘์‹œ ์ ์šฉ๋ฉ๋‹ˆ๋‹ค.

 

let user:User? 
print(user?.name) //Optional("Foma")


JavaScript๋Š” ๋ฏธ๋ฆฌ ๋ช…์‹œํ•˜์ง€ ์•Š์•„๋„ ๋˜๋ฉฐ, ๊ฐ’์ด ์žˆ์„ ์ˆ˜๋„ ์žˆ๊ณ  ์—†์„ ์ˆ˜๋„ ์žˆ๋Š” ๋ณ€์ˆ˜๋‚˜ ๋ฉ”์„œ๋“œ์— '?'๋ฅผ ์ง์ ‘ ์ ์šฉํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

 

let user = new User() 
user?.name //์žˆ์œผ๋ฉด Foma ์—†์œผ๋ฉด undefinded 
//๋ฉ”์„œ๋“œ๋Š” '?' ๋ถ™์ด๊ณ  ๋‚˜์ค‘์— ()๋ฅผ ํƒ€์ดํ•‘ํ•จ 
user?.syaHi?.() //์žˆ์œผ๋ฉด Hi ์—†์œผ๋ฉด ์•„๋ฌด๊ฒƒ๋„ ์‹คํ–‰์•ˆ๋จ.

๋งต

Swift์—์„œ Dictionary๋กœ ๋ฐ˜๋“œ์‹œ ํ‚ค์™€ ๋ฐธ๋ฅ˜์˜ ์ž๋ฃŒํ˜•์„ ๋ช…์‹œํ•ด์•ผ ํ•œ๋‹ค.

 

๊ฐ’์„ ๋„ฃ์–ด์ฃผ๊ฑฐ๋‚˜ ๊ฐ€์ ธ์˜ฌ ๋• ๋Œ€๊ด„ํ˜ธ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ , nil์„ ์ด์šฉํ•˜์—ฌ ์‚ญ์ œ๋ฅผ ํ•œ๋‹ค.

 

๋งŒ์•ฝ ํ‚ค๊ฐ’์ด ์œ ํšจํ•˜์ง€ ์•Š๋Š” ๊ฐ’์— ์ ‘๊ทผํ•˜๋ฉด ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.

 

var dic:[Int:String] = [:]
//or
var dic:[Int:String] = [1:"abc"]
//๊ฐ’ ์ถ”๊ฐ€
dic[2] = "def"
//๊ฐ’ ์‚ญ์ œ
dic[2] = nil
print(dic[3]) //์—๋Ÿฌ

 

JavaScript๋Š” Map์œผ๋กœ ๊ฐ’์„ ๋„ฃ์–ด์ค„ ๋• set, ๊ฐ’์„ ์ฝ์„ ๋• get ๋ฉ”์„œ๋“œ๋ฅผ ์ด์šฉํ•˜๋ฉฐ ์‚ญ์ œํ•  ๋• delete๋ฅผ ์ด์šฉํ•œ๋‹ค.

 

//๋งต ์ดˆ๊ธฐํ™”
let map = new Map()
//๊ฐ’ ๋„ฃ์–ด์ฃผ๊ธฐ (key,value)
map.set(1,"one") 
//๊ฐ’ ๊ฐ€์ ธ์˜ค๊ธฐ
map.get(1)
//๊ฐ’ ์‚ญ์ œํ•˜๊ธฐ
map.delete(1)

์…‹

 

Swift์—์„œ Set์€ <์ž๋ฃŒํ˜•> ๊ณผ ๊ฐ™์ด ๋ช…์‹œํ•ด์•ผ ํ•˜๋ฉฐ ๊ฐ’์„ ๋„ฃ์„ ๋• insert๋ฅผ ๊ฐ’์„ ์‚ญ์ œํ•  ๋• remove๋ฅผ ๋ฉ”์„œ๋“œ๋ฅผ ์ด์šฉํ•œ๋‹ค.

 

์—†๋Š” ๊ฐ’์„ ์‚ญ์ œํ•  ์‹œ ์—๋Ÿฌ๊ฐ€ ๋‚œ๋‹ค.

 

var set:Set<Int> = Set()
//๊ฐ’ ๋„ฃ์–ด์ฃผ๊ธฐ
set.insert(1)
//๊ฐ’ ์‚ญ์ œํ•˜๊ธฐ
set.remove(1)
//์—†๋Š” ๊ฐ’
set.remove(2) //์—๋Ÿฌ

 

JavaScript๋Š” add๋ฅผ ์ด์šฉํ•ด์„œ ๊ฐ’์„ ๋„ฃ์–ด์ฃผ๊ณ  delete๋ฅผ ์ด์šฉํ•ด์„œ ๊ฐ’์„ ์‚ญ์ œํ•˜๋ฉฐ ์—†๋Š” ๊ฐ’์„ ์‚ญ์ œํ•˜๋”๋ผ๋„ ์—๋Ÿฌ๊ฐ€ ๋‚˜์ง€ ์•Š๊ณ  ์ž๋ฃŒํ˜•์— ์ƒ๊ด€์—†์ด ๊ฐ’์„ ๋„ฃ์„ ์ˆ˜ ์žˆ๋‹ค.

 

let set = new Set()
//๊ฐ’ ๋„ฃ์–ด์ฃผ๊ธฐ
set.add(1)
set.add("a")
//๊ฐ’ ์‚ญ์ œํ•˜๊ธฐ
set.delete(1)
set.delete(2) //OK

์˜ค๋Š˜์€ ์ด๋ ‡๊ฒŒ ๊ฐ„๋‹จํ•˜๊ฒŒ Swift์™€ JavaScript์˜ ๊ธฐ์ดˆ๋ฌธ๋ฒ•์˜ ์ฐจ์ด์ ์— ๋Œ€ํ•ด ์•Œ์•„๋ณด์•˜์Šต๋‹ˆ๋‹ค.

๋Œ€์ฒด์ ์œผ๋กœ Swift๊ฐ€ ์กฐ๊ธˆ ๋” ์—„๊ฒฉํ•˜๊ณ  JavaScript๊ฐ€ ์กฐ๊ธˆ ๋” ์ž์œ ๋กญ๋‹ค๊ณ  ๋Š๊ผˆ์Šต๋‹ˆ๋‹ค.

ํ˜น์‹œ๋ผ๋„ ํ‹€๋ฆฐ ์ ์ด ์žˆ๋‹ค๋ฉด ๋Œ“๊ธ€๋กœ ์•Œ๋ ค์ฃผ์„ธ์š”!


Reference


๋ชจ๋“  JS ์ง€์‹์€ ๋ชจ๋˜ JavaScript ํŠœํ† ๋ฆฌ์–ผ์„ ํ†ตํ•ด ํ•™์Šตํ•˜์˜€์Šต๋‹ˆ๋‹ค.

 

 

๋ชจ๋˜ JavaScript ํŠœํ† ๋ฆฌ์–ผ

ko.javascript.info

728x90
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€