๋ฐ์ํ ๋ ธ๋ง๋ ์ฝ๋43 [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] DOM - If else - Function practice [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/UwnBvuFyiBU -์ด๋ฒคํธ์ ๊ทผ์์ ์๊ณ ์ถ์ผ๋ฉด ํญ์ MDN์ ์ฐพ์๋ณด๋ผ const title = document.querySelector("#title"); const BASE_COLOR = "rgb(52, 73, 94)"; const OTHER_COLOR = "#7f8c8d"; function handleClick(){ const currentColor = title.style.color; console.log(currentColor); } function init(){ title.style.color = BASE_COLOR; title.addEventListener("click", handleClick); } ini.. 2021. 2. 26. [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] If, else, and, or [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/NUh9afZ5xUs if(10 > 5){ console.log('hi') } else { console.log("ho") } if(10 === 5){ console.log('hi') } else { console.log("ho") } if ("10" === 10){ console.log('hi'); } else if ("10" === "10"){ console.log("lalala"); } else { console.log("ho"); } if (20 > 5 && "nicolas" === "nicolas"){ // ๋ ๋ค ์ฐธ์ด์ด์ผ ํจ console.log("yes"); } else { console.log("no"); }.. 2021. 2. 26. [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] Events and event handlers [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/LnuLDGO5848 -์๋ฐ์คํฌ๋ฆฝํธ๋ HTML๊ณผ CSS๋ฅผ ๋ฐ๊พธ๋ ๊ธฐ๋ฅ์ ํ์ง๋ง ์ด๋ฒคํธ์ ๋ฐ์ํ๊ธฐ ์ํด ๋ง๋ค์ด์ก๋ค -์ด๋ฒคํธ๋ ์น์ฌ์ดํธ์์ ๋ฐ์ํ๋ ๊ฒ๋ค์ ๋งํ๋ค. click,resize,submit,input, change, load, before, closing, printing ๋ฑ๋ฑ -window๋ ์กฐ๊ธ ๋ค๋ฅธ ์ด๋ฒคํธ๋ฅผ ๊ฐ์ง๊ณ ์๋ค -ํจ์ ๋ค์ ()๋ฅผ ์ฐ๋ฉด ์ง๊ธ ๋ฐ๋ก ํธ์ถํ๋ผ๋ ๋ป ()๋ฅผ ์ฐ์ง์์ผ๋ฉด ํจ์๋ฅผ ๋ฐ๋ก ์ฆ์ ํธ์ถํ์ง์์. ๋งค์ฐ๋งค์ฐ ์ค์!! const title = document.querySelector("#title"); function handleResize() { console.log("I have been .. 2021. 2. 26. [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] Modifying the DOM with JS [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/JscDdICRvgo const title = document.getElementById("title"); title.innerHTML = "Hi! From JS"; console.dir(title); const title = document.getElementById("title"); title.innerHTML = "Hi! From JS"; title.style.color = "red"; console.dir(title); const title = document.getElementById("title"); title.innerHTML = "Hi! From JS"; title.style.color = "red"; con.. 2021. 2. 26. [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] JS DOM Functions [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/VBmQUMUGznU -HTML์ด ์๋ฐ์คํฌ๋ฆฝํธ์ ํจ๊ป ์ฐ์ด๋ ค๋ฉด ์ด๋ป๊ฒ ํด์ผ ๋์ํ๋์ง ๋ฐฐ์ธ ๊ฒ -์๋ฐ์คํฌ๋ฆฝํธ๋ HTML์ ์๋ ๋ชจ๋ ์์๋ฅผ ๊ฐ์ง๊ณ ์์ ๊ทธ๊ฒ๋ค์ ๊ฐ์ฒด๋ก ๋ง๋ค ๊ฒ์ด๋ค const title = document.getElementById("title"); console.log(title); const title = document.getElementById("title"); console.log(title); console.error("Fuck"); ๊ทธ๋ฆฌ๊ณ ์ฐ๋ฆฌ๊ฐ ์ฐพ๊ฒ๋ ๋ชจ๋ ๊ฐ์ฒด๋ค์ ํจ์๋ DOM(Document Object Model)ํํ๋ก ๋ณ๊ฒฝ ๊ฐ๋ฅํ๋ค const title = document.getElem.. 2021. 2. 26. [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] More Function Fun [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/mLTUtMARkqc -์๋ฐ์คํฌ๋ฆฝํธ์์ ""๋ String์ด๊ณ ''๋ String์ด๋ค -``๋ ์ฌ์ฉ ๊ฐ๋ฅ function sayHello(name, age){ console.log("Hello " + name + " you are " + age + " years old"); } sayHello("Nicolas", 15); function sayHello(name, age){ console.log(`Hello ${name} you are ${age} years old`); } sayHello("Nicolas", 15); โ ์ฃผ์ ๋ง์ผ ์๋์ ๊ฐ์ด ์ฝ๋ฉํ๋ฉด function sayHello(name, age){ console.l.. 2021. 2. 26. ์ด์ 1 2 3 4 5 6 7 8 ๋ค์ ๋ฐ์ํ