• 코드:
​x
 
1
<!DOCTYPE html>
2
<html lang="ko">
3
​
4
<head>
5
    <meta charset="UTF-8">
6
    <title>JavaScript Object Method</title>
7
</head>
8
​
9
<body>
10
​
11
    <h1>객체의 isPrototypeOf() 메소드</h1>
12
​
13
    <script>
14
        var day = new Date();   // Date 객체를 생성함.
15
        
16
        // 객체 day의 프로토타입이 Date.prototype인지를 검사함.
17
        document.write(Date.prototype.isPrototypeOf(day) + "<br>"); // true
18
        document.write(Date.prototype.isPrototypeOf(new String())); // false
19
    </script>
20
    
21
</body>
22
​
23
</html>