Transcript from the "ES5 Rewrite Solution" Lesson
>> Our challenge was to rewrite this function in iOS six step one would be to identify what feature exists that isn't available in iOS six, and that is this default parameter. So we have to work with what we got. And the most common way my goodness, good all this craziness, the most common way.
[00:00:24] Okay, let's move over, the most common way to do this is to simply slow all kinds of weird anyone does matter. Is to say b=b, right? So if b has value, great, or what was it 2? Yeah. That's how he did it before So what this is the or operator.
[00:01:06] So this will only evaluate one side if it's true. So to say if this is true, it'll just stop and then it'll just return, great, for the an operator. This is good for if you want it to check if something is true, and then do the second thing.
[00:01:31] So this one says if b exists, then the value is 2, so it's kinda a little bit unusual. Way of using these logic operators as a way to kinda do if else kinda statements in one line, but that's the most common one just like that. Cool, have you guys seen things like this?
[00:02:03] We're using the F in the end.