#author("2019-10-09T14:10:54+09:00","default:ryuichi","ryuichi")
* 型の比較 [#q32ed9ef]

** 型を確かめる - instanceof [#u1587977]

 import { Bear } from './bear.model'; 
 
 const bear = new Bear(3);
 
 if (bear instanceof Bear) {
     console.log("OK1");
 }
 
 // if (typeof bear === Bear) { // typeofでは動かない
 //     console.log("OK2");
 // }


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS