변수명.함수
ob.view(); 이렇게 불러서 사용하는게 특이한거같다.
<script>
function User(name, age){
this.name=name;
this.age=age;
this.view=function(){
document.write('나의 이름은'+this.name+'이고, 나이는 '+this.age+"살 입니다.<br>");
};
}
var ob=new User('kim',25);
var ob1=new User('lee',20);
ob.view();
ob1.view();
</script>