I asked Professor Koo about the javascript data type.
There are many things like bollean, null, etc.I remember seeing null in school class, but it seems like it came out when expressing “no”.Here are the String and Number.String is a string and Number is a number. Open the console and compare numbers with strings.If you calculate 1+1 between numbers, you get 2 and you make 1 into a string, and if you do “1” + “1”, you get 2,,
Eleven pops out. Since it’s Singi, let’s find out about variables.
If you open the console and write as above, it will calculate for you.At this time, x means that the variable = is an assignment operator, that is, an upward term is assigned to the variable.
If I type enter using 1=2, I get an error. Why?Because 1 was constant and x was variable.If you look at our ultimate goal (I didn’t say it, but I want to make a button!)
Click the <input type=” document.querySelector(‘body’).style.backgroundColor = ‘black’; ドキュメント.querySelector(‘body’).style.color = ‘white’; “>< input type=”button” value=”click=” document” をクリックします.querySelector(‘body’).style.backgroundColor = ‘white’;Documentation.querySelector(‘body’).style.color = ‘black’; “>< input id=”낮밤” type=”button” value=”value” onclick=” if(例).Requestor(s” .value=== ‘document’qudumocdドキュメントvument{ document.querySelector(‘body’).style.backgroundColor = ‘black’; ドキュメント.querySelector(‘body’).style.color = ‘white’;Documentation.querySelector(‘#document’).value = ‘document’}count {ドキュメント.querySelector(‘body’).style.backgroundColor = ‘white’;Documentation.Requestor(“) .tar.color= “Black” .tar.color’ “Black”).querySelector(‘#resolute’).value = ‘resolution’
documentation.querySelector(‘body’).style.backgroundColor = ‘black’;여기에서backgroundColor 와 ‘black’사이에 “=” 이 등장하게 되는데,= 는 대입연산자이고,이 =라는 대입연산자에 의해서 ‘black’이라는 ‘값’이backgroundColor 라는 “변수”의 ‘값’이 됐다는 것을 알 수 있다.x = 1x = “jay”name = “jay”backgroundColor = “black”언뜻 보면 서로 완전 다른애들이지만, 시작은 모두 같았다는 것을 생각하며 해보면 이해하기 더 쉬울 것이다.너무 당연한 말들을 즐비해놓은 느낌이지만, 뭐든 기본이 탄탄해야하는 법.