Using a space in a for loop to define a variable will result in an error.
Code Snippet (if applicable) to Reproduce Problem:
for(var i=1; i < 5; i ++)
Expected comma or right parenthesis.
Workarounds:
for(var/i=1; i < 5; i ++)
ID:2310224
Oct 29 2017, 10:29 pm
|
|||||||||||||
Not a bug
| |||||||||||||
Descriptive Problem Summary:
Using a space in a for loop to define a variable will result in an error. Code Snippet (if applicable) to Reproduce Problem: for(var i=1; i < 5; i ++) Expected comma or right parenthesis. Workarounds: for(var/i=1; i < 5; i ++) |
Oct 30 2017, 4:39 am
|
|
Kaiochao resolved issue (Not a bug)
|
I'm with MSO and Cloud on this one.
If DM allows var herp = derp syntax in places where var/herp = derp syntax is permitted, it should be universal. Inconsistency, I don't think was intentional. |
In response to Kaiochao
|
|
So why didn't you merge the topics instead of resolving it as not a bug? Seems like there was never an official answer as to why this isn't proper syntax. I agree $100% dollarpercent that it should be. I write for(var variable) by accident all the time because I define my variables with a space.
|
In response to Intigracy
|
|
Intigracy wrote:
How is this not a bug when the syntax works everywhere but for loops? Bad calls were made. |