题解 | #instanceof#

instanceof

https://www.nowcoder.com/practice/a1169935fd6145899f953ba8fbccb585

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <style>
       /* 填写样式 */
    </style>
</head>

<body>
    <!-- 填写标签 -->
    <script type="text/javascript">
        // 填写JavaScript
          const _instanceof = (target, Fn) => {
            if(target.__proto__ === Fn.prototype){
                return true
            }
            if(Fn.prototype){
                _instanceof(target,Fn.prototype)
            }else{
                return false
            }
}
    </script>
</body>

</html>

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务