admin管理员组文章数量:1242849
I want to use a function in javascript that has many parameters that likely have long names. I want it to look something like this:
functionName( parameter1,
parameter2,
parameter3 );
so far I've tried doing the following to no avail:
functionName( parameter1, \
parameter2, \
parameter3 );
I understand that "\" is supposed to have things continue on to the next line. Am I missing something?
I want to use a function in javascript that has many parameters that likely have long names. I want it to look something like this:
functionName( parameter1,
parameter2,
parameter3 );
so far I've tried doing the following to no avail:
functionName( parameter1, \
parameter2, \
parameter3 );
I understand that "\" is supposed to have things continue on to the next line. Am I missing something?
Share Improve this question asked Jan 15, 2014 at 17:36 user3199313user3199313 631 gold badge1 silver badge5 bronze badges 2- Have you tried your code? – elclanrs Commented Jan 15, 2014 at 17:38
- You obviously mixed up with multiline strings. – VisioN Commented Jan 15, 2014 at 17:39
1 Answer
Reset to default 14You do not need any special character to span lines. Your original is fine:
functionName(parameter1,
parameter2,
parameter3) {}
本文标签: Javascript Function with parameters that span multiple linesStack Overflow
版权声明:本文标题:Javascript Function with parameters that span multiple lines - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740131361a2229807.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论