2020-10-18から1日間の記事一覧
in演算子を使うと簡単。 var a = {dog:1,cat:2}; console.log('dog' in a);// trueconsole.log('human' in a);// false
throw 例外メッセージorその他 で意図的に例外を出せる。 投げた例外はcatch(e)のeに入っている。
in演算子を使うと簡単。 var a = {dog:1,cat:2}; console.log('dog' in a);// trueconsole.log('human' in a);// false
throw 例外メッセージorその他 で意図的に例外を出せる。 投げた例外はcatch(e)のeに入っている。