← オブジェクトリファレンスに戻る

hasVal

概要

引数(括弧内はデフォルト値)

引数 型 必須 指定内容
_data string, object * 任意のデータ

返却値

使用例

const obj = { data: [1, 2, 3], }; console.log(hasVal(obj)); // true console.log(hasVal(obj.data)); // true console.log(hasVal(obj.data2)); // false