JavaScript でオプション処理を記述するためのより良い/より短い方法は何ですか。次のパターンの代わりに?
if(typeof p_options.default_imageset !== "undefined") {
default_imageset = p_options.default_imageset;
} else {
default_imageset = 'mm';
}
ありがとう。
JavaScript でオプション処理を記述するためのより良い/より短い方法は何ですか。次のパターンの代わりに?
if(typeof p_options.default_imageset !== "undefined") {
default_imageset = p_options.default_imageset;
} else {
default_imageset = 'mm';
}
ありがとう。