New object

new object

1 JavaScript[ | ]

  • constructor notation
var obj = new Object();
obj.name = 'jmnote';
obj.age = 3;
var obj = {}
obj.name = 'jmnote';
obj.age = 3;
  • literal notation
var obj = {
  name: 'jmnote',
  age: 3
};
console.log(obj);
// { name: 'jmnote', age: 3 }

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}