one of the JavaScript's data types.a collection of related data and/or functionality.Nearly all objects in JavaScript are instances of Objectobject =
class? ์ฐ๊ด์๋ data๋ค ํ ๋ฐ ๋ฌถ์ด๋๋ container ๊ฐ์ ์์ด.field ์์ฑ : name, agemethod ํ๋ : speak();์ฆ class๋ fields์ methods๊ฐ ์ข ํฉ์ ์ผ๋ก ๋ฌถ์ฌ์๋ค. class : template ํ์ ๋ง๋ ๋ค. dec
document : Html์ ๋ํ ๋ชจ๋ ๊ฒ์ js๋ก ๋ณด์ฌ์ค๋ค. ์ ๊ทผํ ์ ์๋ html๊ฐ์ฒด. ๋์ website. ๋ชจ๋ ๊ฒ๋ค์ document์์๋ถํฐ ์์ํ๋ค. document object๋ฅผ ์ด์ฉํ์ฌ html์ ๋ณ๊ฒฝํ ์ ์๋ค.ex)์ด ์ฝ๋๋ฅผ ํตํด ์ด ๋ฌธ์์ ์ ๋ชฉ์ด
์๋ฐ์คํฌ๋ฆฝํธ๋ฅผ ๋ค๋ฃจ๋ ๋ฐฉ๋ฒ : ๋ธ๋ผ์ฐ์ ์ console ์ด์ฉํ๊ธฐ.HTML์ CSS & JS ๋ถ๋ฌ์ค๊ธฐnumber integer = full number (์ ์) ex) 1,2 / float ex) 1.2 string = text ex) "hello"con
ํจ์(function) ํจ์ ๋ง๋ค๊ธฐ onclick ๋ด์ ์๋ this๋ ์ด ์ด๋ฒคํธ๊ฐ ์์๋ ํ๊ทธ๋ฅผ ๊ฐ๋ฆฌํค๋๋ก ์ฝ์๋์ด ์๋ค. ๊ทธ๋ ๊ธฐ์ ๋ ๋ฆฝ๋ ํจ์๋ฅผ ๋ง๋ค๊ฒ ๋๋ฉด script ํ๊ทธ ๋ด์์ this์ ์ญํ ์ ํ์ง ๋ชปํ๋ค. ์ด ๋ -> ๋งค๊ฐ๋ณ์์ ์ด๋ฆ์ self๋ก ๋ฐ๊พธ๊ณ