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
5 months ago we are using string for identifying some stuff:
var abc = "badstuff/abc"
var isBad = abc.indexOf("badstuff")>-1
// fine
we later switched to id, so
var abc = 13;
var isBad = abc.indexOf("badstuff") > -1;
// well this is wrong
so I approached the colleague and said to her that we use id now, indexOf("badstuff") no longer works, and id can be arbitrary, like 3245.
-- ok ill do it.
I dont know 3245 looks really like a special id or not. this is the outcome:
var abc = 13;
var isBad = abc.indexOf(3245) > -1;
lol.
undefined
js colleague