Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Bikonja23867yWait, what happened here? The compiler should ignore that space between floor and ( afaik
-
nicholai8937y@ChainsawBaby did you ever try XO? Not only does it lint, it also slaps yer bum and pinch yer cheeks and while it might seem rude to you, its really just making you write better code.
-
nicholai8937y@Bikonja Its inline javascript (that is; inserted into an html file) - probably no toolchain or even compiler on there
-
Bikonja23867y@nicholai I just skimmed the picture so I didn't notice it's JS inside HTML.
Still, the interpreter should ignore that space so I still don't see the issue -
nicholai8937y@ChainsawBaby yeah, i still use eslint in a single project but everytime I do, i miss that bittersweet XO tough loving
-
Salmakis6737yI wonder wich Interpreter/compiler would mind that space oO... Internet Explorer? Normally space/tab should not have any Controll function :}
-
It's probably interpreting it as a math multiplication, by solving `(Math.random(...))` first since it's between parenthesis, and then multiplying it by an object, the function `floor`. Something like this:
```
(Math.floor) * (Math.random(...))
``` -
@rephiscorth In every single browser even this works:
Math .
floor
(
Math
.
random
( ) *
255)
Don't know what OP is doing, but JS shouldn't give a crap about whitespace. -
Root826027yI spent hours on a capital V instead of a lowercase v.
A change elsewhere in the codebase exposed the V issue, and that exposed another issue that broke logging and partially froze code execution.
Finding it was a nightmare.
Related Rants
kill -9 me
undefined
fury
white-space
space