This course has been updated! We now recommend you take the Complete Intro to Web Development, v3 course.
[00:00:28] And AND means that you have two values, an A and a B. For AND to return true, both those values have to be true. So if I do true and true.
>> Nina Zakharenko: We're gonna get a true. I do a true and a false, we're gonna get a false.
>> Brian Holt: You need to [INAUDIBLE].
[00:01:31] It doesn't matter what the second value is. So you can do like true and blah, blah, blah. Oops, true and-
>> Brian Holt: Two [INAUDIBLE].
>> Nina Zakharenko: The only time OR returns false if is if both values are false. So NOT is just a negation. Not true is false, not false is true. And we can combine these, the AND and the OR and the NOT in different combinations.
[00:02:47] I won't go into anything too complicated, but for an example. Let's do true and true. We're gonna use parenthesis here, and we're gonna negate the value of what's inside those parenthesis. So true and true returns true. And then negating it returns false.
>> Nina Zakharenko: Is anyone have questions about this?
>> Speaker 3: There's question about the single logical operators. Do they perform bit-wise operations?
>> Brian Holt: Even if you're crazy.
>> Nina Zakharenko: Yeah, just don't do it.
>> Nina Zakharenko: So, here's a combination of a logical operator and a comparison.
[00:03:43] So we have x is 5 and y is 3. We check, is x less than 4? The value is false. Is y less than 3? Yeah it is, so false and true is false.
>> Nina Zakharenko: Oops, same with this operation here at the bottom. X is not less than 4.
[00:04:33] The values in it are separated with a comma. Arrays have some useful properties to them. One of them being length. So, oops, if we make an array here
>> Nina Zakharenko: We use an open score bracket to start it we put in some strings and they're common delimited. We use closing bracket to close it.
>> Nina Zakharenko: So, if we wanna access an item in our array, we use square brackets. So we call the name of our array, open bracket, a number, close bracket. So an important thing to note is that array access is actually zero based. So even though the length of our array is two, we would access the first item by callings fruits zero.
[00:06:13] And the second item by calling fruits one