Talk:How to manipulate Canvas elements: Difference between revisions
Jump to navigation
Jump to search
(→named arguments in examples ?: new section) |
m (→named arguments in examples ?: oops, lol) |
||
Line 7: | Line 7: | ||
foo(altitude:100, label | foo(altitude:100, label:"hello world"); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
I feel that this would help make the code more self-explanatory, what do you think ? --[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 14:21, 5 December 2017 (EST) | I feel that this would help make the code more self-explanatory, what do you think ? --[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 14:21, 5 December 2017 (EST) |
Revision as of 19:21, 5 December 2017
named arguments in examples ?
Hi there, fantastic job ! May I suggest that we use named function arguments, i.e. in the form:
var foo = func(altitude, label) {
}
foo(altitude:100, label:"hello world");
I feel that this would help make the code more self-explanatory, what do you think ? --Hooray (talk) 14:21, 5 December 2017 (EST)