21
Tytanium
131d

String.substr()'s second fucking argument is a length not an index.

FUCKING WASTED 10 MINUTES ADJUSTING PERFECTLY GOOD FUCKING LOGIC BECAUSE JS IS A BITCH!!!

Thank fuck the fix was just to use string.substring() instead or I would've killed myself

Comments
  • 2
    Also hi
    first rant in while lol
  • 0
    Vscode should have helped with that 😀
  • 1
    @shahidcodes Lmao I'm using Atom rn because VSCode takes almost 100% CPU and slows my setup to a crawl.
    I'm computer is pretty powerful too so I have no idea what's happening lol
  • 1
    @Tytanium there must js definition intellisense extension for atom too.
  • 1
    This is where c++ iterators are superior to indexes as integers. They are a bit different but very handy when you get used to them.
  • 4
    How exactly is it the fault of Javascript when you don't know the API?
  • 0
    @FetzenNET Ughhh Ik it's not I was just annoyed :(
  • 0
    @Furyzer00 I love C++ but there's no ( official ) discord API :p
  • 3
    That's the lesson for today kids. Drink your milk, eat vegetables and read the docs 😛
Your Job Suck?
Get a Better Job
Add Comment