SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>答案</title>
</head>

<body>
    <script>
        function Duck(sound){
            this.sound=sound
            this.quack=function(){console.log(this.sound)}
        }
        var toy = new Duck('quack quack')
        toy.quack()
        console.log(typeof toy)
        console.log(toy instanceof Duck)
    </script>
</body>

</html>