javascript OR ||

From: Peter (BOUGHTONP)22 Jan 2015 22:52
To: CHYRON (DSMITHHFX) 11 of 15
Have you ever encountered a faulty traffic signal that was stuck on red?
From: Ally22 Jan 2015 23:06
To: CHYRON (DSMITHHFX) 12 of 15
Probably really inefficient code, but before now I've done
 
Code: 
if (['ap','cgov','chs'].indexOf(oclient) > -1) {

Oh, and your original statement doesn't work because || basically starts a new if statement. So you were saying "if oclient equals 'ap' or if 'cgov' or if 'chs'", and because Javascript is annoying nice it tries to convert it into something that'll work - a string is "non-false", so it'll return true.

EDITED: 22 Jan 2015 23:08 by ALLY
From: CHYRON (DSMITHHFX)23 Jan 2015 02:20
To: Peter (BOUGHTONP) 13 of 15
I don't drive.
From: Peter (BOUGHTONP)24 Jan 2015 01:55
To: CHYRON (DSMITHHFX) 14 of 15
Well yes, why would you when you can crawl.

I mean, you've been crawling for quite a while, you're pretty good at it, can shuffle up quite a pace on all fours. It makes perfect sense to continue doing the same thing, you'll get somewhere in the end, even if everyone else has long since moved on.

From: CHYRON (DSMITHHFX)24 Jan 2015 19:06
To: Peter (BOUGHTONP) 15 of 15