引数を持つ関数の場合:
function displayCouplet(var couplet) {
document.write(couplet);
}
displayCouplet("The object of my worship lies beyond perception's reach,For men who see, the Ka'aba is a compass, nothing more.");
Uncaught SyntaxError: Unexpected token varというエラーが表示されます。何故ですか ?引数からキーワードを省略してもvar
問題ありません。これがなぜなのか説明してください。