컴퓨터/Javascript

객체지향프로그래밍

풍경소리^^ 2019. 7. 12. 04:39
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>intro</title>
</head>
    <script>
var grades={ //객체지향프로그래밍
'list':{'egoing':10,'k8805':8,'sori':80},
'show' : function(){
for(var name in this.list){
console.log(name,this.list[name]);
}
}

}
grades.show();
</script>

</body>
</html>


grades // 객체

list

show //함수


https://www.youtube.com/watch?v=Mi33-EcMn48&list=PLuHgQVnccGMA4uSig3hCjl7wTDeyIeZVU&index=40