This course has been updated! We now recommend you take the Complete Intro to Web Development, v2 course.
[00:00:34] Let's do that.
>> Nina Zakharenko: I'm making two variables that are numbers. And if we did x + y. We would get eight. But if I did var x is 5, with the quotes var y is 3 with the quotes. If we did x + y, we'd get 53. So, something to watch out for.
[00:01:09] So, expressions, we can also store the results of expressions in variables. Which is nice because that means we can use them for later. There's two special kinds of operations. And that is a ++ and a --. So the ++ means increment that variable by one. The -- is decremented by one, so.
[00:02:16] There's the ==, which is equal to, and the ===, which means equal in value and type. != is not equal to. !== is not equal in value or type. And let me go over that really quick because it's important. You really won't see a triple equals in any other language.
[00:03:23] So if they were both strings would they match. Same with
>> Nina Zakharenko: Sorry, same with not equals. So we can do x != y, which is true. They're not the same, which is the inverse of x == y. There's also greater than, less than, greater than or equal to, and less than or equal to, which is useful for mathematical operations.
>> Student 1: This is a question back on the operators.
>> Nina Zakharenko: Yes.
>> Student 1: Do they do anything on other types besides numbers? So I think strings that if you concatenate them.
>> Nina Zakharenko: If you concatenate strings?
>> Student 1: Yeah, can you use the plus operator?
>> Nina Zakharenko: Yeah.
>> Student 1: What if they do another types? What's the question anyway?
>> Nina Zakharenko: So what they do for number is it's just adding them.
[00:04:57] What they do for functions I think is kind of outside of this scope of this class.
>> Nina Zakharenko: Yeah. Let's find out.
>> Student 2: Actually, I think it will call two string function.
>> Nina Zakharenko: Actually, I'll do this demo when we talk about functions. I'm getting a little bit ahead of myself.
>> Student 2: Nothing useful, I guess you answer that question.
>> Nina Zakharenko: I'm not sure what happens if you call less than on a string, am I error out or not. And guessing this might be alphabetical. Yeah, so that checks for order. Does that make sense?
>> Student 2: So, the answer is that, depending on what the types are, it may or may not do something useful.
>> Nina Zakharenko: Yes, yeah.
>> Student 2: So, for example, multiplication of two strings probably doesn't do anything useful, or is it a syntax error? I guess that was really.
>> Student 1: I think it returns not a number.
>> Student 2: Okay, so it is an error.
>> Student 3: That's not gonna stop your program. NaN stands for not a number, which is essentially just that, [INAUDIBLE] nothing useful.