Friday, January 3, 2014

Plug In And Plug Away

    Conditionals!
Apparently I need to brush up on my terminology, because; I've been using these for a while, but I didn't know their name. Oops.
Once again, I'm at my favorite coffee shop trying to get some classwork done. I'm a little early because my boss said no work today. So, I headed over here after a decent sleep. Now to get an hour or to in. I try not to work for too long. I start going crazy. So, a walk or something will probably happen in the middle of this.
I finished the taxiFare section and am now in an overview of everything I've done up to this point. Mainly they just want me to check out their blog. So, I'm going to plug in my headphones, get some of Them Crooked Vultures going, drink my iced tea because I'm too broke to buy coffee, plug in and plug away!
Coding notes:
Seriously, <else if> rocks, but I know how it works. I think that they think I wasn't paying attention to anything they said.
I've been waiting for <&&> to make a show. And now, TADA! <&&> everywhere!

var checkNameGender = function (yourName,gender) {
//All the code below was used in exercise 1.6

    if (gender.length > 0 && yourName.length > 0) {
      if (gender === 'male' || gender === 'female') {
            return true;
      } else {
            return false;
      }
    } else {
      return false;
    }
};
checkNameGender("Mookie","male");

And there's my last lesson. I actually went through that really easily. Finish on success, right?
I've always liked the idea of having Mookie for a nickname. Now I can amuse  myself by telling the code to call me Mookie. =-)