객체의 생성 과 읽기, 쓰기
Object
var coworkers = {
"programmer" : "egoing",
"designer" : "leezche"
};
document.write ("programmer : " + coworkers.programmer + "
");
document.write ("designer : " +cowokers.designer+"
");
coworkers.bookkeeper = "duru"; 중요
document.write("bookkeeper : " + coworkers.bookkeeper + "
");
coworkers["data scientist"] = "taeho"; 중요
document.write("data scientist : " +coworkers["data scientist"]+"
");
객체와 반복문
Iterate
객체에 프로퍼티 와 메소드
property & Method
Property & Method
객체의 활용
var Body = {
setColor : function(color)
{
document.querySelector('body').style.color = color;
} ,
setBackgroundColor : function (color)
{
document.querySelector('body').style.backgroundColor = color;
}
}
Body.setBackgroundColor('black');
Body.setColor('white');
Body.setBackroundColor('white');
Body.setColor('black');
Let's think about this : function is a tool for organizing code when it's too long
Then what is an object? It is also an organizing tool to group related functions
and variables together
when there are too many of them .
But what is there are too many objects ?
This kind of thoughts can be endless
===============================
What is Node.JS?
Perhaps, you are familiar Web browser
and WEB Application to create that you will need
HTML.
-> Node.js Application
->JavaScript
->Node.js runtime
자바 스크립트를 통해서 노드js가 가지고 있는 기능들을 제어 그다음에 노드 js 에 있는 기능을
이용해서 node.js Application 을 하나씩 하나씩 완성해 나가는 것이다.
Through the Javascript, I will control the node.js and then
by doing so I will create node.js Application.
'Programming > Node.js and Javascript' 카테고리의 다른 글
URL 구성표 (0) | 2020.05.01 |
---|