javascript OR ||

From: CHYRON (DSMITHHFX)22 Jan 2015 21:27
To: 99% of gargoyles look like (MR_BASTARD) 7 of 15
Can't remember. Probably. Maybe.


edit: ok, I just tried it. didn't work.
EDITED: 22 Jan 2015 21:31 by DSMITHHFX
From: Peter (BOUGHTONP)22 Jan 2015 21:29
To: CHYRON (DSMITHHFX) 8 of 15
I can't say - it's too shit a name to know what it's for - but anything which gives the 'o' a precise yet concise meaning will do. Something that a different person can look at and know what it is for.
From: 99% of gargoyles look like (MR_BASTARD)22 Jan 2015 21:30
To: CHYRON (DSMITHHFX) 9 of 15
I figured it wasn't working because it's essentially taking the first comparison, then running the other OR statements separately, which is why I suggested parentheses around the comparison to the right (whatever that's called). 
From: CHYRON (DSMITHHFX)22 Jan 2015 21:39
To: Peter (BOUGHTONP) 10 of 15
o means "other". You'd have to search for "other" instances in the script to figure it out. If you happened to be looking at the script (don't worry, you won't), you might notice I'm in the habit of using similar variables throughout, mainly to reduce verbosity and make things easier to spot. Like using "e" for "event", or "i" for whatever "i" stands for ("idiot"?). I also use comments. Thus "oclient" makes it's first appearance under 
Code: 
// "OTHER" [more commenty stuff you don't need to know]
(there's another variable "client" preceding that section in the script).

You could probably manage it, I concede that "others" might not. I can sleep knowing that.
EDITED: 22 Jan 2015 21:40 by DSMITHHFX
From: Peter (BOUGHTONP)22 Jan 2015 21:52
To: CHYRON (DSMITHHFX) 11 of 15
Have you ever encountered a faulty traffic signal that was stuck on red?
From: Ally22 Jan 2015 22: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 22:08 by ALLY
From: CHYRON (DSMITHHFX)23 Jan 2015 01:20
To: Peter (BOUGHTONP) 13 of 15
I don't drive.
From: Peter (BOUGHTONP)24 Jan 2015 00: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 18:06
To: Peter (BOUGHTONP) 15 of 15