11

I'll just put it here and let the internet judge.

parseInt(((height - 81 - 20 - 20 - 50 - 7 - 30 - 240) / 6), 10);

Comments
  • 4
    Constants, man.
  • 1
    @gronostaj that and rounding by casting it from number to string to number...
  • 6
    root@panduro:~# node

    > parseInt(((height - 81 - 20 - 20 - 50 - 7 - 30 - 240) / 6), 10);

    Thrown:

    ReferenceError: height is not defined

    >
  • 2
    Use constants. Magic Numbers are bad.
  • 0
    Looks like someone gave up before converting all those constants.
Add Comment