- 객체 생성하기 var grades = {'a':10, 'b':15, 'c':20}; var grades = {}; grades['a'] = 10; grades['b'] = 15; grades['c'] = 20; var grades = new object(); grades['a'] = 10; grades['b'] = 15; grades['c'] = 20; - 객체 값 가져오기 grades['a'] // 10 grades.a // 10 for(key in grades) { document.write(key + ':' + grades[key]); }