|
-
FK'n_dog
if(angel=true) - typical newbie mistake 
angel will always be true !! -- use ==
-
poet and narcisist
 Originally Posted by a_modified_dog
if(angel=true) - typical newbie mistake
angel will always be true !! -- use ==
actually, probably just if(angel) is better, considering angel wouldn't be
a boolean, but an object.
in terms of namig, it'd be better to name alienporn alienPorn, and it's a bad idea to create a variable inside an if condition, as when you need the var, you won't know if it got created (if the condition was true), and if it's going to be used, it should always contain a value. So maybe it'd be better to use
alienPorn=(angel)? 'why not?':'';
-
Retired SCORM Guru
 Originally Posted by argonauta
actually, probably just if(angel) is better, considering angel wouldn't be
a boolean, but an object.
in terms of namig, it'd be better to name alienporn alienPorn, and it's a bad idea to create a variable inside an if condition, as when you need the var, you won't know if it got created (if the condition was true), and if it's going to be used, it should always contain a value. So maybe it'd be better to use
alienPorn=(angel)? 'why not?':'';
No dude, you've got it wrong. Alien is a type of porn, a subclass. You need something more like this:
if (pornObj.type == "alien") {
// do stuff here
}
I mean, if we really want to get strict about it, there should be a pornTypeCatalog object that we can call and search for ALL types of porn that fit the "alien" descriptor. The example aboves assumes just one, and anyone who's spent time on the internet knows that's too limiting.
var alienPornTypes = new Array();
alienPornTypes = pornTypeCatalog.getTypeFromDescriptor("alien");
for (var i=0; i<alienPornTypes.length; i++) {
alienPornTypes[i]=(angel)? 'why not?':''
}
More overhead, but we need to be thorough about managing and sorting our classifications of porn.
Last edited by PAlexC; 12-29-2008 at 09:22 PM.
"What really bugs me is that my mom had the audacity to call Flash Kit a bunch of 'inept jack-asses'." - sk8Krog
...and now I have tape all over my face.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|