207
Comments
  • 6
    Been there but instead of space it's semicolons.
  • 0
    Hahahaha.
    Well done.
  • 1
    @Jilano that's the first tap vs spaces thing I give a ++
  • 19
    One word. Lint.
    God made to ease our pain
  • 11
    Wait, what happened here? The compiler should ignore that space between floor and ( afaik
  • 0
    @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.
  • 1
    @Bikonja Its inline javascript (that is; inserted into an html file) - probably no toolchain or even compiler on there
  • 0
    @nicholai nope, haven't tried XO. Quite happy with my ESlint setup
  • 0
    @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
  • 1
    @ChainsawBaby yeah, i still use eslint in a single project but everytime I do, i miss that bittersweet XO tough loving
  • 12
    SPAAACEEEE
  • 2
    I wonder wich Interpreter/compiler would mind that space oO... Internet Explorer? Normally space/tab should not have any Controll function :}
  • 1
    @Salmakis in Ruby spaces do
  • 2
    LINT PEOPLE!
  • 0
    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(...))
    ```
  • 3
    @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.
  • 1
    2 hrs? try 9 hrs to find the f***ing ;
  • 1
    I 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.
  • 2
    You need to multiply with 256 to get values between 0 and 255 🙃
  • 0
    ESLint, anybody?
Add Comment