JavaScript 4at TECH
JavaScript 4 - 暇つぶし2ch82:デフォルトの名無しさん
15/02/19 00:01:52.76 4zgsUurY.net
>>79
直した…スマソ
function test(hoge, foo) {
'use strict';
if (typeof hoge === 'boolean') {
console.log('hoge is', hoge);
} else if (hoge && typeof hoge === 'object') {
if (hoge.hasOwnProperty('hoge') && typeof hoge.hoge === 'boolean') {
console.log('hoge is', hoge.hoge);
}
if (hoge.hasOwnProperty('foo') && typeof hoge.foo === 'boolean') {
console.log('foo is', hoge.foo);
}
}
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch