LoginSignup
0
0

More than 3 years have passed since last update.

JavaScriptの引数の数チェックについて

Posted at
1 / 2

JavaScriptの引数の性質(備忘録)

JavaScriptでは呼び出し側の引数の数が呼び出し元と一致しなくてもエラーとならず、下記の結果となる。

console.log(message);
}

displayMessage(); //undefind
displayMessage('hoge'); //hoge
displayMessage('hoge', 'foo');//hoge

参考文献

改定新版JavaScript本格入門 ~モダンスタイルによる基礎から現場での応用まで 

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0