Well, hello everyone and welcome to Sailor Academy's PRDV 401 introduction to JavaScript This is our unit for review if you haven't seen any Videos in this series yet check down in the description below their link there as well as a Link to the entire course because this these videos are a supplement to the entire course So make sure you guys are falling along with the course with us And if you have any questions as we're going along you can leave them in the chat box on the side I'll to be keeping an eye on that Or you can leave them in the comment section below for if you're watching one of these later But you know everyone's busy, so we'll just hop right into it And I'll hand it over to Susan White and she can get us going and I'll be here if you guys need me All right, thanks Mike. All right, so we're in unit four now. So let's get started Okay, who am I? I am Susan Hoyt. I'm from Houston, Texas. I have been a computer science educator for about 25 years I've been with Sailor for a little over a year now I do love to teach coding. It opens up a whole new world for so many people and there's so many Instances that you might need it or use it or find a job that uses it In my spare time, I do hang out with my dogs I apologize if somehow you hear them in the background barking and I do like to read a good book and I'm all about the sand and the beach and the warm weather All right So this is going to be our first in the series of three courses that will eventually be out that cover the JavaScript language There's six units in this course. We are on unit four today So we have done one two and three and those are already on YouTube and you can go look at them if you miss those you can always go back and look at those and Get caught up on that sense Whoa, sorry, I do that all the time with this mouse All right, so we're gonna start unit four last week. We did cover unit three In that as we talk about the certification I always want to say it every time that we go through this And the course final exam not the each unit test But on the course final exam you do have to score 70 in order to receive your certificate You can retake that exam as many times as you need to get that actual 70 But you do have to wait a week apart to take the other test But you can continue to do it All of these unit tests and all of these assessments at the end of the units will help Prepare you for that so that way you may not have to take it more than one time Okay We'll also talk about Code Runner and we'll talk about Code Runner again today Just so that you can kind of see how that works for coding in our assessments and then We actually use some developer tools last week to run some of our coding code examples And these are the topics that we covered. We did a lot of topics last week. So it's a pretty long Video so we had variables operators keywords. We did values and data types We talked about operators. We actually wrote some simple JavaScript statements and then we looked at a few different editors We we will look at jet JS hands again today We will look at replete again today and we will look at Code Runner again today So you will see all of those again today Whoops All right, so completing this unit should take you approximately two hours What are we gonna cover in this unit? We're gonna cover conditional statements. So we're gonna talk about if else while switch I actually didn't put the rest of them on here, but we're actually gonna talk about do while and we're gonna talk about for loops and Test all those out and do some examples and see what kind of little small mistakes that you want to be careful of We will use relational Boolean operators with conditional statements and we'll write some code that implements interactive choices based on a condition So if you enter something You'll have a choice based on that. So we'll do some of those examples together All right, so let's get started on conditional statements. So what is actually control flow? Control flow in your program can be sequential. It can be selection and it can be repetition For sequential, we're talking about just a straight line I started at the top of that program and I just go line by line all the way to the end and very rarely Do I have programs that are interactive that would be something like that? So we definitely have to get past that sequential execution and get into some conditional stuff here So in our conditional you see that we're no longer going just a straight line from left to right We're coming from the left. Okay. Now we're gonna hit something here and this is gonna be a decision in This decision if we select say true, we'll go this way and if we select false we go that way So this is an example of like an if statement. So the if statement Would have this if it's true do this otherwise do that and so As we go through we have some if-else's that we'll see and those if-else's will have some more branching off stuff So we're gonna look at some examples and go ahead and start out with our examples here So in my examples Let me grab over here And I will put them here I'm gonna go straight to the course and show you where this is So if you notice here, I grabbed the link, but I'm in unit 4 if you haven't done 3 2 or 1 You definitely want to go back and do those so I'm in unit 4 and I went here and I'm looking at the control flow And you see over here it gives me a table of contents and shows me where I'm at so right now we're in control flow and conditional execution So what we want to look at here is we've got some if's and here's the little graphic I just showed you so we're gonna grab this if statement And I'm gonna bring it into replete remember. I showed you replete before if not, it's replete com and Then you make your own login and then when I go create the one that I like to choose is the node.js Again, if you've seen this it makes weird names. I don't really care those weird names can stay there And I wait for it to get ready and then I'm just gonna throw my code over here And I'm gonna try it out So if you see here, I'm gonna go ahead and just run it real fast And I'm gonna let you see what it looks like and then we're gonna talk about the parts So if I run it, it tells me to pick a number. Okay. I have no idea what a number is gonna do So I'm gonna do 25 Okay, so it tells me that 25 is the square root of 625 And it only runs at one time because we haven't done repetition yet So if you notice here, we did our let the number equal So this is our prompt which you'll have to use a prompt later in the actual Exam for this unit. So Remembering how to do a prompt would be helpful So you can always go back and look at these examples to help you now here We're using a Boolean knot which we covered last week So we said if our number is NAN we covered NAN last week. So what does that mean if my number is not a number? Not then I will do something and so let's happen if I run it and I say it is not a number I'm gonna say the word five Did it do anything Nope, it did not because it only will do this if If it is not Not a number. I know that sounds like a double negative, but this is gonna return true If whatever I enter here is Not a number it will be true So if it is not a number I don't want it to do this So I want it to be false and not do the if Because how does the if work? Well, we got the word if what you can tell is a keyword just like let is Then we have the parentheses these outer parentheses will contain where our Boolean statement is whatever statement we put into the if here has to has to Be either true or false whenever it evaluates. So this is our Boolean statement and Then once it evaluates if this statement is in fact true Then it will come in here and it will do whatever is in here If this statement is false in this case, I don't have an else or anything. So that means if I have some kind of Statements down here or anything like that What state notes if I need statements down here Then it would just skip it and go to whatever statement I have down here Now if I do something that is a number so let's do 12 this time 12 is a number. So it came in here and it did console log and it said the words Your number is the square root of this plus means. Hey, I want you to concatenate this To this string and notice whenever it prints out It's all on one line like that and then I took the number which was what they entered and I multiplied it by itself Also notice here. I did make sure their prompt was a number So I need it to be a number in order to do some kind of calculation with it. Alright, so now let's move on to the other one Let's try this one Now this one is pretty basic Notice we have an if again and we have our parentheses Inside those parentheses has to be some kind of a statement that would evaluate to either true or false One plus one equal equal to that is a statement that could evaluate as either true or false So let's run it and see what it says It says it's true. Now last week. We also talked about You can use three equal signs so that it makes sure things are the same on both sides And it's still true that way. So don't forget about these three because those are also good things to use Now, how does it if look a different because we put it all on one line Putting it all on one line that looks fine, but sometimes it's much better to come over here And replete automatically and did it that for me But if you indent it over here Then sometimes it's easier to see the actual flow of the program rather than having it all on one line Because a lot of stuff in JavaScript you can put all on one line and it looks terrible, but it'll still run with no problem Alright, so let's do another one now and we're going to add in else So How does the else look as opposed to just in it Alright, we still have our prompt which is a number. We still have the same if that we talked about But notice here that now I have an else The else is evaluated only if the if is false. So if this statement right here is a false statement Then it will execute the else So when I execute the else it says hey, why didn't you give me a number because this will only evaluate if It is not a number Now some people will when they first start doing this They will want to put something here and they'll want to put like else number Is and they'll want to put the opposite here You don't want to do that because you don't have to and it will not work So this else should not have any kind of condition next to it. This else works Because if this is false, I do the else if this is true. I do the if And that's the only thing that's That's different on this. So let's do this and let's do it with Five like that And so five is not a number. So this became false So it went down here and said hey, why didn't you give me a number Now if I run it and I actually do the number five It actually tells me I went inside the if now and I did this statement So that's an if else now. Do we have other stuff that we can use Notice this one this one has even more else's Now you know how I tried to put this here and I said don't do that because you really don't want to put a condition there If you think you might need another condition then you may need something like this Where you're going if something else if something else else if this other thing So this is a nested if else So notice for every if or for every else you've got to match it with it with an if you can just have it randomly there So if I have this else I can follow this curly brace back to see what if it connects to If I don't have curly braces for any reason and else is attached to the closest if So let's see what would happen here. We are having them pick the number If it's less than 10 we should say small if it's less than a hundred We should say small if it's less than a hundred. We should say medium and if it's anything else we're going to say large. So let's try this All right, so I'm going to do a number less than 10. So I'm going to do five Small okay that works If number is less than a hundred. Okay, so I'm going to pick Nine That's still small because it gets hit right here by this one Now what do you think's going to happen if I hit 10 10 is greater than 10 so this one is going to be false So now it's going to come here and is number less than a hundred Yep So now it's going to say medium now. How do I get this one to happen? Well it has to be a number that looks like it's going to be let's try one greater than a hundred or let's just try one greater than a hundred Let's just try a hundred because this one says less than so let's do a 100 And a hundred got us to large Now if we had tried to do this with just ifs we would have run into a problem because Let's do this real fast. I'm going to take off these Let's make sure I take them off right. I may have extra curly braces You do Help me do I'll put it else here with this Okay, so this one matches with that and this matches with that So Basically I have an if Number is less than 10 do small if numbers less than a hundred do medium else do large So let's see what happens here and why it looks different. So I'm going to pick not So since I did not have that else It hit this if and it hit this one Because nine is less than 10 and I didn't have the else that made it avoid this one if I put that else Then it says, okay, I only do any of these else is if this one wasn't true So when you're trying to do stuff a lot of times when you're trying to break it into ranges or like great like say doing grades Anything like that. You definitely need some if else is in there All right, let's see if I I Did want to show if you don't put any curly braces after it. Yeah, so let me do this All right, so I could say if number is equal to 10 less than 10 We're going to change this one around a bit and I'm going to say console log Less than 10 Okay, then I'm going to have something else That I want to happen that in the same thing console log And the same thing console log Okay So let's say I wanted these two statements to happen if the number was less than 10 so I run it I'm going to pick a number less than 10 Okay Even though I indented like this some of you may be coming from Python and you're used to indenting like this and you're like, okay Well, if I indent it knows I mean it to go with that if absolutely not In JavaScript, you've got to add the curly braces to let it know. Hey, I want you to do more than one statement So now if I do nine It shows both. Okay. That's if I wanted both. Okay. Now. What if I only wanted one I can change it and I can put a curly brace there or if I just wanted this to happen all the time. I can leave it like that So if I wanted This looks great. This looks like this is going to happen all the time. So whoops Hold on Oh, I've got a curly brace. Hold on. Let's get rid of that one Try that again All right, picking a number nine nine should be less than 10 and this happens all the time So Again If I did this It looks like it's always going to happen. So if I did 10 Let's do 10 This happens all the time even though I indented it because I did not put it in a curly brace or Basically if you want more than one statement in your if you have to have a probe race Let me stop talking in circles. All right. Let's move on. Let me see. I think I got all those All right. Let's head on All right. So we did the first part where we talked about using an if or an if else and now we really need to talk about loops So let's look at some while and do while loops. So let's start here. All right So I'm going to grab this I'm going to throw it over here into replet real fast. All right. So if I run this This will show me all the even numbers between zero and 12. Okay, so this is great But what if I wanted all the even numbers between zero and five thousand? I would not want to write five thousand lines of code. So that's where loops come in and that's where they're great to have So let's look at a loop And talk about the different parts of it really fast So I want a loop that does the same thing So a loop has three parts. It has a starting condition It has Some kind of conditional to make it stop and it has to have a way to change that starting condition so that it gets closer To this condition so that the loop is not an infinite loop So part one. So this is our part one Our condition right here is going to be our part two And our changing of that condition to get it closer is going to be our part three All right, so let's see what happens when I run this Exactly the same output instead of having all those lines of stuff I only have these and the best thing about it is that I could totally make this go to five thousand if I wanted let's just do five hundred And easily goes to five hundred took a couple seconds not a big deal now a couple of things to think about and let's go back to 12 all right, so we went from zero to 12 whenever we did it A lot of times you'll see me start counting at zero because a lot of the computers will count from zero Now there's a couple of different things that you can see in a loop. We have the wild condition And just like the if we have these parentheses and these Will contain a condition that if it's true it does a loop if it's false it would come down here and do whatever Statements are down here So Whenever you're doing the loop things to think about is how you want it to display if I wanted it to display zero to twelve Like my other one did great. That's what it did But sometimes you might accidentally do something like this and you switch the order of your stuff And I'm just going to comment out this previous one. So now notice. What am I doing first? I am adding two to it before I actually view it or print it so in this case Instead of it going from zero to twelve it goes from two to fourteen. So let's see why When you go through a loop the first thing it does is it takes your initial value. So the number is zero So we come here and is zero less than or equal to twelve. Yes, it is. So immediately I come into the loop I immediately in this case add two to my number so number immediately goes from zero to two and then I print it So that's where this two came from right here Then what I do and I'm just going to remove this one for right now so that you don't get confused Then I don't just go on to the next statements. I come back up When I come back up my number was two Okay, that's what I just printed. So now I come back up to my condition and I say is two less than or equal to twelve If two is less than or equal to twelve then I do the loop again So it is so I would do two plus two so now number would be four and I would print four Then I would come back up is four less than equal to twelve. Yes So then I would add two to four which is now six and I print six and then eight and then ten And then twelve Now when number was twelve it was still less than or equal to twelve So number becomes fourteen I will print fourteen even though it says number less than or equal to twelve A lot of people when they first look at loops they get confused and they go okay Well my number was twelve and so I came in here and my number became fourteen So then I should leave the loop No, you don't leave the loop in the middle like that unless I throw in a break and I'll show you how to do that later But it only leaves the loop when it comes up here and it checks then it's going to leave the loop So it was fourteen it printed fourteen Now it's going to check it and fourteen will not be less than or equal to twelve so it will leave the loop now and so It all depends on how you want things to show up So if I wanted this to be like it was to start with We would switch that and then this case Oops Sorry I didn't mean to do that Hold on Try that again Let's see Alright so let's get rid of this one. It's time to go back to how we used to be Alright so this is how we were to start with So in this case fourteen doesn't get shown because I print the number before I increase it So those are just some statements there for you to remember and let me grab the other hold on Clicking too many windows here. Sorry Let's grab this one now and let's see what this does This is another while Alright so this while has a result And a counter Now notice I have this counter here and I have the counter here So sometimes you'll hear it called the loop control variable or they'll call it LCB for loop control variable Because the counter is the one that's controlling the loop. If this is true, our loop happens Notice I'm changing my counter in here and I'm making sure I change it so it gets closer to ten Because it started at zero so adding a little bit more of a counter It's going to get closer to ten because it started at zero so adding one to it means it's going to get closer to ten So let's run this really fast Now what did this do This did two to the tenth power So now watch if I did a couple of tricky things here What if I accidentally did Let's do Counter is equal to counter minus one Let's do that for a minute And I don't even see something happening because my counter is doing weird stuff so I I'm like I don't know what happened let's try Checking the couple of things you always want to check whenever you have a loop that's giving you some problems Is always check this condition Make sure because if I if I'm thinking in my head I need this counter to go until it's greater than ten Sometimes I'll accidentally write that And so if you notice here what did my counter start with this is my step one My counter started at zero So is it ever even going to get into this loop No it isn't because zero isn't greater than ten So in your mind when you're thinking okay I need to finish this loop when it's greater than ten Always kind of think about okay well I wanted to finish them but when do I want it to go through the loop But you make sure you get the less than or the greater than in the right way Because watch if I would have done greater than here It said one because result was one And then I did not go through this loop because counter was zero it's not greater than ten So when I printed the result I printed my original one So again this is our step two this is our thing that controls our loop And then this is us changing our condition so it gets closer so that we can get out of it Always check this now if we were trying to do greater than ten We would have to have our counter start at something bigger Okay so we'd have to have it start at something bigger And then we'd have to be careful on this because counter's twenty so that would go in and result would be this And then if I kept adding to counter would this loop ever stop If I have output and it's looking like this and nothing seems to be happening it could be an infinite loop So always go back and check am I is this right are these right and go and check all those step one two and threes to make sure you're doing the right thing Whoops alright let's do another one This one looks a little different If you look here our while we always checks the condition first before it goes into the loop now watch this one that I'm going to show you This one says do and then it has curly braces after those curly braces at the bottom it says while and then it has its condition and a semicolon When you are using it do while and that's what it is called the thing about this loop is that you are guaranteed for it to happen one time So if you know that you are having someone enter things or something like that where you know hey I need them to do this loop at least one time no matter what Then you want to do while so watch what happens here Okay so it asked me who I am so I say my name Then it's going to say while it's not your name so while I haven't entered anything it's going to keep asking me I entered something right So if I hit enter it just prints my name but let's see what happens when I don't enter anything It continues to ask me hey who are you can you enter something so I can put this loop Sometimes you could see a do while going for a password type program Because you need them to definitely enter the password at least one time to check and see if it's correct So you'd say do enter the password while the password isn't correct I keep asking them to enter it I can have other things like that Alright so let's move back over here for a second and let me see if I did everything I got to do the for loop example which I think is the next one let me do next page I think I have to do next page and next page yes Now I want to do a for loop so I'm going to show you a for loop Some people prefer for loops over wild loops some people are the opposite They all can kind of be configured so that they can all do the same thing so watch this one Whoops Oh I missed the semicolon Alright then this program looks familiar it goes from 0 to 12 so it's doing all the even numbers Here's where the for loop is kind of nice the for loop has step one Then step two and step three all on one spot That way you make sure that you have all three of those if you want so in this case we're starting with number zero We will continue this loop while number is less than or equal to 12 and each time we will add number or increase number by two Okay some people accidentally do this a lot and they would put number plus two and that does not change that original number So we have to have something like number equals number plus two or we can use a shortcut notation that we talked about last time which is plus equal Two and that means the same thing so if I run it same output Okay and same thing now this would be a little harder to change from that while loop or to print out the 14 I would have to start it at two And then I'd have to have it go to 14 here can I still have it work Of course I just have to change up things a little bit differently on how I'm how I'm printing stuff out Alright so that's the first for loop which has again step one semicolon step two semicolon step three semicolon Now then I'm going to write something out here let's do Okay so I'm going to put that there real fast And some people when they do for loops they accidentally do that Let's see if I can make it work like I want Whoops that's going to tell me number is not defined because I have stopped my while loop and I defined my number in there Now I could also have something like this happen Let's number equal two And then I could just do number equals two here Now notice I did not get the same thing it only printed out 16 Okay so what happens whenever you have it and you accidentally put a semicolon at the end of your for loop Is that your for loop now becomes this one statement and it has no code associated with it So it will do the whole loop and it will finish and once it finishes number was 16 And so now this is just like another statement And it prints out 16 So that is a huge thing to be careful of because I can't tell you how many times people forget and put a semicolon there Or they put a semicolon at the end of their if If you had an if and I'll show you that again whenever I go through some if you accidentally put a semicolon at the end of that You will have problems in a while loop if you put a semicolon there you will have a problem in a do while you do need one On the bottom so I will show you that again don't worry. Okay, let's look at this one now. All right, so now we are going to go and we are going to do the power to Oh, I forgot the console long hello. I can spoil that be helpful. All right, so let's see what our result was. 1024 same thing we got on our while. So we have our results and notice we had to start our results at one. That's a mathematical thing because if we started at zero we would end up with zero because zero times anything is going to end up being zero. Things to look at here again be careful don't put your semicolon here. Our counter equals counter plus one. Don't just leave it like this because that'll cause you problems, and you can actually write it like this and make it a little bit shorter and say counter plus equal one, or even better since we're only increasing by one, we can go counter plus plus. So that's another good way to write, and it makes it easy to read. Now, if I run it. I get 1024. Okay, what do you think is going to happen if I go and I take this print. And I also put it in here. I'm going to comment out this one right now and not have it, and I'm just going to run it. Now, since I put the print statement inside the four. Now I have what every single time I go through the loop it prints. Sometimes if you're having problems and not knowing if your loop is happening it's always helpful to put a print inside there and make sure that you can check and see what your loop is doing. All right, I think that's the last of my four. Okay. Let's move on here. Okay, quick notes about it. Make it look nicer again. Okay, most loops will exit when that loop control variable Boolean statement is false. We can also use break and break will jump out of the loop. Another keyword using looping is continue the keyword continue will make it skip that iteration and go on to the next one. Okay, so I just looked at this, instead of using counter, we can use counter plus one counter plus equal one or like I just did a minute ago. I did counter plus plus, and those will all add one to count. Now let's look at an example of the break will pass. Let me get here. Right. So here we're going to break out of a loop. I'm going to show you it with a for loop. It's a little different. And again, all these examples that I'm getting are from the actual course. So as you go through the course and look through it you'll see all these. All right, so look at this I'm going to run it real fast. So it looks like it prints 21 and stop so let's see what's going on. Notice I have my part one of my for loop, but look what I'm missing. I'm missing part two, I'm missing a condition. So that means this loop could potentially go on forever. I have my current equals current plus one, which we just can change that if we want to. Now, this is my if, if current modulus seven, what does that mean. That means if whatever current is is evenly divisible by seven. Okay, because I said equal equals zero. Remember modulus is remainder division. So it's takes current divides it by seven gets that remainder. If that remainder zero that means it was divisible by seven, and I will print it. So 21 is definitely divisible by seven. Then instead of repeating my loop, I will break. All right. What happens if I don't break. Let's see. I don't know. Do you see that now I am in an infinite loop. Luckily for me, I can just press stop here and it doesn't kill my computer, but I can press stop and it will finish. So if I didn't break and I didn't have this condition notice it will go on forever. And we don't want that. So that's why breaks can be handy sometimes they will get you out of that loop. All right. All right, here's some more if statements that I just wanted to show you on how they look on their syntax. So with our if we have our condition inside the parentheses. We do not put a semi colon here because if you put a semi colon there you're going to have problems with our else we don't have a semi colon either. And with our else we do not need a condition next to it. The only person who's going to have a condition next to it would be an if. So we could have an if with its condition and then else with another if and have its condition. So, whenever you're having your else ifs, make sure you do some kind of indentation make it look nice, make it easy for you to come back and review. All right, now we're going to talk really quick about switch cases. Switch case is another way that you could use basically like an if else. So, there is an example in action where they go through a whole switch case and this is what it looks like. And I have it and I'm going to show you a couple things from that actual video, but I highly suggest you watch that video because they go through it step by step and show you different things. All right, now all the different parts of the switch when I get it over here, and we'll talk about it how it works. Let me grab it real fast. All right, let's get the switch going. All right, so I have this bar today is remember with bar I could also say, let and it would be fine. Okay. So, what is happening here is that I am deciding that Sunday is zero. Monday is one Tuesday is two and Wednesday is three and so on. Six is going to be Saturday. So zero Sunday, six is Saturday. So in this case, I'm starting to count at zero, which I told you is a common thing with computer science stuff. I started counting Sunday at zero Saturday is six. So there are seven days for sure. Now, I print out at the end what I'm going to make my date statement be. If you notice, I have two cases here together and I'll explain those in a minute, but you should notice that I say the word first I say switch. What variable I want to switch on. So in this case, I'm going to switch on whatever today is value is. So these cases tell me, okay, if today's case is zero. And it's six. Okay, so those are two different things that it could be, then it's going to do this. If the case is one, it's going to do this. If the case is two, it's going to do this. Now what I want to show you here is after every case statement, there's a break. If you don't put a break, you run into problems. Some people like to put the break on the next line like this. Some people prefer to put it at the end here like that and line it up that way. Whatever works for you is fine. You just can't forget to put a break and I'll show you what happens if you do in the second. All right, so if I were to run this today is zero. So it says it's the weekend, it's time to program. Notice after case zero, I don't have a statement. So at case zero, it goes here. And it goes ahead and does this one. And in that video they talk about why this happens and why you shouldn't do it some other ways like using a or and stuff like that so I highly recommend watching that video it's very helpful. In this case, let's go ahead and do case one. Okay, case one doesn't work. But hello. We got it wasn't input. Sorry about that. Let's make today is one. And that's Monday. That's great. Okay, let's try six. All right. Six works. Okay, now let's try something. I don't know why I keep hitting run every time. I go through all these I got right right right now I have a default down here. What does default mean default means hey, it didn't match any of these guys here so I don't know what they're putting in. So I always want to have a default down here to catch in case none of these match so let's do it as eight. And let's see if it hits that default. So it did. It went to there and I can have some kind of statement saying hey your input is incorrect, whatever kind of catch so this is kind of my catch. So this switch, you can think of it's like an if if today is zero. I do this else if it's six I do this else if it's one I do this and so you can line it up with an if else, or you can do these cases which kind of make it look nice.  Case one. Okay, I took off the break. Now watch. Say I did it again. Okay. Watch when I make it Monday. It said Tuesday, because I didn't break after I had it. So, when I do a switch case, if I start to have some weird outputs like that, I need to go back and make sure hey did I put a break everywhere and make sure that those are working. Okay, let me think there's anything else on switch case. I think that's it. Notice it does have curly braces around it. Again, the switch, what variable I'm going to switch on and then all of the cases for that variable here, and then a default that catches any of those cases you did. All right. And that was example in action. Okay, looping statements. How about a while loop with Sentinel. All right, let's do this one. What is a Sentinel value. A Sentinel value is a value that when you enter it and make sure loops stop. So, well, hello. Let me try that again. All right. I have this. So I've got a prompt for them to enter a number or a negative one to stop. Okay, I'm going to tell you right now that negative one to stop tells me, oh, that's my Sentinel value. And right here I have my while. And it says, while my input value is not negative one, then I go ahead and do this loop. I'm going to enter negative one. I will stop. So let's watch. Please enter a number. So I'm going to do five. Five squared is 25. So now if I want to spare some other numbers 12. 58 or 17, whatever I want to do when I'm tired of doing this, I'm bored of it. So now I'm going to enter negative one. So now when I enter negative one, which notice I'm entering it down here. Now, on loops where they have user input and the while loop is based on that user input, a big problem that people will forget is first I have to have a prompt to start the loop so I've got to get them to enter something to start it. If I do the loop, I have got to have them input something again, because if I forget to get another input from them, then it will never change input values will stay the same. Because remember, we've got our three things. This is step one. Get it a value. This right here is our step to some kind of way for it to stop. And then this in case of us just adding numbers are doing something. This is actually our step three that gives us a chance for it to become negative one so we can exit the loop. If we don't have this part three inside our loop, then it will never change and we'll be stuck in an infinite loop again. So over here I did negative one. And boom, I'm done. It stopped. So that is an example of a Sentinel value. All right. Four statements. All right. I don't think I need to do another one of these. I'm just going to tell you the things I had talked about. These are all the things to watch about. Make sure that you're using the right conditional right here. On this counter, I said counter plus plus instead of counter equals counter plus one or counter plus equal one. You can use whichever you like. Make sure you got all three. Don't put a semicolon here you put a semicolon here you're going to run into problems. Okay, so off by one errors. That's where I switched for my, where my printing statement was, and it went from two to 14 instead of zero to 12. So be careful on that too, and you might have to change your variables when you're doing that. Okay, so the do while creates a loop that will run into the condition is false, since it checks, hold on let's grab this. And since it checks, it will execute at least one time it's called a post test loop. And so, no matter what it's always going to run there I did that again. It's always going to run one time. Hold on a second. There we go. Okay. So we're going to grab this do while. And throw him over here. All right. So this is another do while this do while has a result that's going to be a string. And we start I at zero guess what this is this is our step one. All right, where's our condition. Oh my gosh it's at the end down here. So this is our step three. So our step two, our step three is going to be who's changing who's my loop control variable. That is step three. All right. Initialize it. Make sure I have a condition to get out and make sure somewhere I'm changing this loop control variable, so it will get me out of it. Now I'll run it real fast. All right, so I is zero. I becomes one result is result plus I. So now what would I want to print out. If I type, I would probably want to print out I and let's see what it is. That should make sense. It went from zero to five. But you might say, wait, it says I had to be less than five, but I am outside the loop here. Have I see that if I'm outside the loop, then that means it had to become five because it got out of the loop. Let's make I 25. Now down here I said I needs to be less than five, but this is a do while, not a while loop. So no matter that this will not meet that condition, it doesn't matter I go in order so I do this first and it says do I becomes I plus one so I will become 26 result will become result plus 26. And now I will check my condition. I did not check it until I got to the end. So I will always do this loop one time. So when I got down here to check it. I said, Oh, I can't go into that loop again because that doesn't meet the condition so now I should print 26. So a do while always happens at least one time. All right. So fix the switch statement. Let me show you this one and we're going to do it really quickly. All right, so as we're going through here's our practice review, fix the switch state. So I click on it. It opened up a window so I'm like, Oh, I guess I should read you what I'm supposed to do. Let's see how well you understand the syntax for switch. So this is using the Lenter JS hint which we did in unit two. So it says to go ahead and copy all this. And go ahead and throw it in here. And remember a Lenter is here to check things for you. It does not run your code. You would take this code and you could put it back over here into replete and you can check it and see if it does in fact work for it. And you notice it starts off and it says, Hey, you're missing the semicolon. So I look in line seven and I go, Oh, look how I am missing a semicolon and I put it. Notice it went away. Now look, this one is telling me I expected a break before your default, and I didn't do it. And so look, I can add my break. Then it tells me, Hey, you have a unnecessary semicolon. Okay. And now the warning. This is an okay warning. This is talking about what version of JavaScript I'm using, and that's okay. But right here it tells me I'm trying to use an undefined variable. So I go, Oh, I forgot to give fruit type. What are you like. And I could start it at nothing if I wanted. And now it's telling me, Hey, let is only an ES six. Okay, well, that's great, because I'm using it so it's not a problem. But if I changed it to bar notice that goes away. So if I use lead it's telling me, Hey, you know, something could happen and you could take this code, and you could copy it. You may have to add a few things to test it over here. Okay, so if we did it, let's see. Okay, so my fruit type was nothing. So it said default. Sorry, we're out of fruit type. And then it went outside of my switch and said, Is there anything else you'd like. So let's try one of these just real fast and I'm going to move on. Let's try cherries. Okay, so it tells me right here in the case of cherries, cherries are $3 a pound. So that's a great way to check. And sometimes if you're working over here in replete. You may not know what you messed up on because sometimes these error messages are not as good as one of these linters so you may decide to try it here first, and then bring it over here, whatever works for you. All right. What I'll have you covered today. Conditionals loops switch cases breaks continue sentinels. Let's talk about the assessment really fast and wrap this up. All right. So I'm going to go back to you know for like this. And here's my whole unit for this is all the stuff we've just talked about so now I'm going to go down to the assessment. I'm going to get to my assessment. I must say continue my attempt. I may have to refresh it. I don't remember if I saved anything. One through nine different answers, matching output tell me what the output is things like that. All right, then we hit to number 10. We get to number 10, we're going to make a temperature converter. Always make sure you read through all this stuff. You can find out the user. Okay, so you say, oh, I don't remember how to prompt or remember at the beginning of this, we did some prompts where I entered things. So you can go back and you can find out how to prompt. And then after you prompt, you're going to use if else that test for the choice. Then you'll calculate the temperature. They're asking you to use document dot right. If you use document dot right. It will write it down here for you and you'll actually see it down here. You can write it that way and you can display an alert which displays no data entered cancel selected for the choice of the 10. So how to complete it. You can contain HTML or CSS. So guess what, we're not going to bother with either of these two windows tells you to expand the jazz pain to enter all the necessary code and enter your code after the comments. So that means I come down here, and I don't want to work with this little tiny window. This is our code runner so we're going to bring it down some here and make it bigger. And I can make it bigger even if I need a bigger than that. I'm going to put my prompt here. I'm going to put however I need to do the prompt. Notice as soon as I do that my prompt comes up. So that's kind of a pain to have. So sometimes you might decide, okay, well, first of all, where did my let go. Your lead is here. It is just really light blue, and your bar up here is there is just really light blue. Now notice, did you see what's telling me I was missing a semicolon. Sometimes when I do these prompts, I will comment out, do the coding for the prompt, and then run it that way I don't have to deal with all that. Then I'll have another one here where I prompt for the temperature. Then in here, I will have some kind of it. It will be like if choice. So I'm going to do equal equal or it could be really careful and do equal equal with three of them. And so if they said see, then I'm going to convert from Celsius to Fahrenheit. And then else I would do the other or however you want to set it up. I'm not going to write out the whole thing because I definitely want you to practice doing this. So that's exactly how to do the prompt. Go back and look at the other code that we have talked about. Okay, so let's finish this up. Again, the letter R is hard to see but it's there promise. And you may want to comment out that alert, or any kind of prompt or anything that you're doing that will be annoying. All right, that is it from unit four next week is unified the basics of functions, completing that unit on five should take approximately two hours. We're going to talk about how to identify types of functions, how to use functions with arguments, compare the different type of function decorations and write code that actually calls the function. Our next live session is December 6 at 530 Eastern and we will cover unit five. Thank you. And I hope you learned something today about all this looping and if else. All right, well, first let me just say, well thank you for taking us through that that that was great thank you as always. And thank you everyone for joining us. And of course, if you haven't, if you weren't joining us live, you know, you had a question feel free to leave it in the comments. We'll get to it if we see it there. And of course just a reminder that this is just one of our larger series of videos that you can find in a playlist down below that are covering in our just a review of Sailor Academy's JavaScript course, which you can find the full course of linked below as well. But again, thank you everyone for joining us. Thank you to Susan Hoyt for taking us through all of this and we will see you guys at the same time next week for for unit five. Thanks for joining us. All right, bye thank you.


Welcome to All Hands Update, this is your week in Navy history. On July 12, 1990, Commander Rosemary B. Mariner became the first woman to command an Operational Aviation Squadron. She was one of the first women to qualify as a naval aviator. July 13, 1943, Allied forces intercepted Japanese reinforcements attempting to land in the Solomon Islands, resulting in the Battle of Columbia, N. Gara. The Navy lost USS Gwynn in the battle. Gwynn received five battle stars for service in World War II. On July 16, 1915, the battleships USS Ohio, USS Missouri, and USS Wisconsin became the first U.S. Navy combatant ships to transit the Panama Canal, stemming from the Atlantic to the Pacific. The Panama Canal was relied upon heavily during World War I as it allowed the United States to cut travel distance by nearly 8,000 miles. To learn more about the Navy's history, visit the Naval History and Heritage Command website.


My involvement in programs involving queer youth affects my peers in a couple different ways. Outside of my work environment, it's generally a very positive experience because my community is queer supportive and queer involved most most of the times. And with my peers at work, it's good.  But it's it's recognized and it's I've never received any negative feedback. I think that most times if it's ever anything that's a little bit controversial, it's that they're unaware of what GSA stands for or why I would say queer youth instead of a different word that they may use. The school that I work at could create a safer environment by having a standard of language and talking about representation and gender stereotypes at an all school level. Instead of just on a teacher to teacher basis or administrator to administrator basis, starting the year with that and talking about, you know, what is a safe space and how do we engage and communicate inside of that? And what happens when there is someone who feels unsafe or what happens when our community is not adhering to these sort of safe space rules? Because I think that it's good to we can start with that idea, but there also needs to be a process to deal with something when that doesn't happen. I don't this is an interesting question because I believe that I've always been queer friendly in my life. I think that sometimes there was different societal conditioning that took place where I sort of questioned like, oh, you know, that person looks really flamboyant. And I wasn't sure exactly the sort of underpinnings of what that meant when I was making that judgment. And it was in college when I really sort of like dived deeper into the sort of questioning of what queer meant and how I identified and how my friends and our interactions with our parents and our peers and our schools and all the structures that come along with society. And it was college where I really started to delve deeper into that. But I think that growing up, I mean, I always had queer friends.  And so therefore my friend, it was just something that happened and was and looking back on it was like, yeah, you know, it's always been a part of my life. This is such an interesting question because when I think of my favorite movie, I was asked this so much more frequently in my youth. And so my youth answer was Pearl Harbor, because I loved the two main actors and actress. And so it was always just really visually stimulating for me. But in watching that movie now, I'm not quite sure that I can engage with the gender roles in the same way that I did in high school. And so now I really, I really enjoy Gladiator for the strong female presence at the end, because I feel like, you know, admits all this like male glory and like fighting.  And then, you know, alongside that there's also a strong female role, which is really important in today's culture. I don't see it that often. So when I think about what colors sort of like represent me or, you know, my heart tone or energy color, I always come to magenta as sort of like darker purple. And for a long time, I felt like that really represented the sort of like the darkness, but the beauty in the darkness and how it's strong and powerful and has these sort of like blood veins through it, you know, and is really like at the heart of the human experience. And I think that it brings out that, the humanity, but also the understanding of the pain and the experience of so many people and the ability to still be beautiful.


Today we're talking about Google My Business. What is Google My Business? Well, it's basically the, if you think back 15 years ago, it's what section of the yellow book do you want to be in, right? So Google My Business is the online directory. That's the interface that Google places your business, your hours, your address, etc. Onto their database, what they use for Google Maps. It's very, very important for your website. I can't tell you how many insurance professionals I run into that don't have Google My Business set up directly or claimed, right? So if you have Google My Business set up, you're set but you also have to make sure that you claim it as well. So if you Google your brand name and it says claim this business, make sure you click on that button that says claim and go claim your business because if you don't someone else will. They'll send you a postcard, you can claim it and that's how you get going on getting your actual directory listing set up with Google and it's super, super important for your marketing.


Yeah, good morning, everyone. Oh, is it extra loud? So we are almost at the end of our Doctrinal foundations. We have one more foundation to go next week That would be the end times, but today we will deal with the doctrine of angels So this would be the so we will be doing doctrine of angels today and Next week we will finish with end times So let's get started Maybe we can look at one verse which talks about God creating the angels So that would be Psalm 148 verses 2 to 5 So anyone who has their Bible open if you could read out for us Psalm 148 versus 2 to 5 We are two minutes into the class. You should have your Bibles open by now Some 148 versus 2 to 5 praise him all his angels praise him all his posts Praise him son and moon praise him. So it says in Psalm 148 verse 2 Praise him all his angels praise him all his heavenly hosts and then it goes on to explain that these Hosts and angels have been created at the command of the Lord It says that in verse 5 Psalm 148 5 let them praise the name of the Lord for at his command They were created. So just like human beings angels also are created beings. So Angels may have some superior powers In status wise, they may have a different status from humans, but they are also just Created beings like us. So the angels of God the ones who stayed faithful to God They are created beings and even the fallen angels which became demons. They also are just Created beings. So all angels however powerful they may consider themselves to be They are all under the control of the Creator God So in the same way, we are dependent on God Even the angelic beings are dependent on God, you know, they are not in any way Independent just because they have more power So what should be our approach to angels? Okay, so let's get into that right away The first thing We believe in the existence of angels We believe that angels have been, you know, placed by God to serve the church to serve the believers But we are very clearly told in scripture not to worship angels in any way So let's look at a couple of scriptures which Emphasize that if we can maybe first read out Colossians chapter 2 verse 18 Colossians 2 18 Let no one cheat you of your reward taking delight in false humility and worship of angels Including into those things which he has not seen vainly puffed up by his fleshly mind So in Colossians 2 18, it's talking about some people in the church who had kind of gotten sidetracked Sidetracked they were kind of going into these Mystical Jewish teachings where the where interaction with angels was emphasized There was this one segment of the Jews who believed in Mystical teachings they believed in making contact with angels They believed in receiving messages and visions from the angels and they believe that they were superior to all the other Believers because they were receiving this kind of special Messages and revelations from the angels. So here I mean Paul is writing to the Colossian believers He says that's a dangerous thing to do. He says these people they boast of worshipping angels, but that will disqualify them from the kingdom of God So it is a very serious and dangerous thing to indulge in the worship of angels and Paul goes on to say that these people they talk in great detail about what they have seen and They are puffed up with idle notions by their Unspiritual mind so they would boast to all the other members in the church saying, you know The angel came to me and the angel revealed this particular message to me and they will they were beginning to spread false teachings which they have received from these angelic beings So Paul warns and says do not worship angels and do not, you know receive false teachings from them and Do not boast about visions and revelations and dreams which you have received from the angels We also see in Revelation 19 verses 9 to 10 John's response when he encounters an angel, I mean we are familiar with this verse And in fact this this particular event happens, you know a couple of times But if we could read out Revelation 19 9 and 10 then he said to me, right Blessed are those who are called to the marriage supper of the lamb and he said to me These are the true sayings of God and I fell at his feet to worship him But he said to me see that you do not do that I am your fellow servant and of your brethren who have the testimony of Jesus Worship God for the testimony of Jesus is the spirit of prophecy Now this is passage which is talking about John John was one disciple who considered himself very close to Jesus He's the one who rested his head I know on the bosom of Jesus at the last supper this man who worships Jesus Who is completely loyal to Jesus and in fact who in the end, you know is martyred for the sake of Jesus This man when he encounters an angel, what is his response? He is so overcome with awe at what he is seeing that he literally falls down on his knees and tries to worship this angel So the angelic beings Really are very Grand to look at when you look at them you are you feel all because they are so Different from humans. They are so much grander Bigger superior that you almost feel like worshipping them and this is something which John is doing I mean, you would not expect that of John, you know So which is why that in warning which Paul gives in Colossians 2 18 is a very valid warning Angels Are so impressive that we in our very limited small human minds They actually want to worship them, you know, if we if we see them so Paul very clearly wants and says do not indulge in such things because that will disqualify you from the kingdom of God and so here when John who is, you know Overcome with awe at the grandeur of this angel that he is seeing and he literally falls down on his knees and tries to worship the angel This is what the angel says the angel says don't do that.  We are warned in the scriptures not to worship angels in any way a Second thing that we would need to keep in mind from the scriptures Is found in 2nd Corinthians 11 13 to 14 so if someone could read out 2nd Corinthians 11 13 to 14 for such a false Apostles the sightful workers Transforming themselves into Apostles of Christ and no wonder for Satan himself Transforms himself into an angel of light So when Paul is writing to the Corinthian believers, he says be careful There are going to be false teachers who will come to you and they will present themselves as teachers of the light In the same way Satan also pretends to be an angel of light So when angels come to us, you know, if any of us has an encounter or a vision or a revelation from an angel The first thing we would need to ask ourselves is whatever this angel is revealing is it in line with scripture And if what the angel is saying is not in line with scripture, however grand that angel may look However, divine he may look we just choose to reject that message because it is not lining up with what the word of God What Jesus has said so Jesus the word of God is our standard To whom we look up to Jesus is the one who is our master Jesus is our God and Lord whom we worship So if any angel comes to us pretending to be an angel of light and gives any message Which contradicts what Jesus has spoken we automatically reject it and in fact In Galatians 1-8 Paul says the same thing to the believers of Galatia Galatians 1-8 if someone could read out Galatians 1-8 if someone could read out But even if we or an angel from heaven reach any other gospel to you That what we have preached to you let him be accursed So Paul, you know, it's very firm in what he says here Even if an angel comes to you, you know in all of his grandeur and Preaches something to you that contradicts the gospel which has been taught by Jesus Then, you know, let that angel be a cursed let a curse come upon that angel is what he says so Just because angels look very grand and because in our eyes, they look almost divine We must not just simply accept whatever they say they may be false Angels of light, you know, they're actually angels of darkness pretending to be angels of light. So Paul wants that even if an angel were to preach something that contradicts the gospel of Jesus Christ We should be, you know, ready to reject that So the two things that we see from the scriptures is that we must never worship angels We must worship Jesus and in the same way We must accept the gospel of Jesus Christ what he has taught and what he has preached and we must not accept the false doctrines which are brought by angels a third thing that we are warned about in scripture which Is a little more difficult to understand would be the two passages in 2nd Peter and in Jude So we will look at that now. We will first maybe look at 2nd Peter chapter 2 versus 10 to 12 2nd Peter chapter 2 versus 10 to 12 And especially those who walk according To the flesh in the lust of the uncleanness and despise authority. They are presumptions Self-willed. They are not afraid to speak evil of dignitaries Whereas angels who are greater in power and might do not bring a reviling accusation against them before the Lord All right. So here we see that Peter talks about certain false teachers who have no respect for authority of any kind So here Peter in fact, he says in the first verse of chapter 2 2nd Peter chapter 2 verse 1 He says that these false teachers are Secretly introducing destructive heresies these false teachers are Secretly introducing You know wrong kinds of teachings into the church and he goes on to say they don't even have any fear for God himself They have no fear or respect even for God and in the same way They don't have any fear or respect for God. He says they don't they don't have any fear of the Celestial beings either and over here the celestial beings that are being talked about are You know the fallen angels and the demons because these are Celestial beings against whom the angels spoke judgment So these are not good celestial beings that are being talked about these are evil fallen Heavenly beings that are being talked about over here. So these false teachers They had no respect for God. They were introducing false teachings into the church and They were also speaking very mockingly about the angelic beings We are not told exactly in what way they slandered the angels. We are not told exactly what kind of You know evil things they were saying about these evil spirits But Paul says this is not Peter Peter says that this is not a wise thing to do So his argument is that When the when the angels of God the good angels when they were asked to bring Judgment upon these evil spirits, even they were very careful in the way they spoke So when the angels themselves were so careful in speaking against these evil spirits when they were bringing judgment upon them Shouldn't humans be more careful in the way they deal with the demonic spirits? So that's the argument that he brings out over here And we get a little more clarity regarding this passage in Jude which talks about the very same event so if we were to go to Jude which only has one chapter and if we were to read out verses 8 to 10 Let us see what you know explanation is given over there, Jude chapter 1 verses 8 to 10 likewise also these dreamers Defile the flesh Reject authority and speak evil of dignitaries yet Michael the archangel In contending with the devil when he disputed about the body of Moses Did not bring against him a reviling accusation but said the Lord rebuke you so here we see that We get to know a little bit about what Peter was referring to when he said When the angels had to bring judgment on the evil spirits, they were careful what they spoke We get more clarity on this event in the Jude letter where we get to know that The devil wanted to make Wrong use of Moses body You know, maybe he wanted to get hold of that body and get the Israelites to worship the dead body of Moses or something We don't we don't really know in what way he wanted to misuse the the body of Moses But at that time God sends Archangel Michael to him to speak against him and bring judgment upon him at that time Then the archangel Michael who is a very very high High-level angel when he is speaking to the devil. He does not, you know abuse The devil verbally in any way. He just simply says may the Lord rebuke you may the Lord judge You so he only just speaks the judgment which God has, you know, asked him to give and he leaves so The argument that both Peter and Jude make is this they say When even the angels are so careful in the way they speak about the demons and to the demons Shouldn't humans be a little more wise in the way they talk about the Demons so in both of these passages The the believers are clearly told that they must not Just mockingly Slander demons as and when they wish So if this is the case then how should we believers actually deal with angels? What is the scriptures tell us about this? What should be our dealings with evil spirits and demonic beings three main things? The first to remember is that we should never be afraid of the demons. That is very very clear Okay, so we are warned not to slander the demons and speak recklessly about them But at the same time we do not need to be afraid of them in any way Let's look at a couple of scriptures which bring out this very important truth first John chapter 4 Verses 3 to 4 first John 4 3 to 4 And every spirit that does not confess that Jesus Christ has come in the flesh is not of God And this is the spirit of the antichrist which you have heard was coming and is now already in the world You are of God little children and have overcome them because he who he who is in you is Greater than he who is in the world now these believers in The to whom John is writing he says dear children you belong to God So you don't have to be worried about these demons He says you know because you belong to God you have overcome them The one who is in you is greater than he who is in the world So you do not have to be afraid of the demons. In fact, you can overcome them and have victory over them. Okay, so In first John 4 3 to 4 we are given the assurance that because we can overcome the demons We do not have to be afraid of them in any way also We are given an assurance in Romans chapter 8 verses 37 to 39 Romans 8 37 to 39 Yet in all these things we are more than conquerors through him who loved us For I am persuaded that neither death nor life not angels Nor principalities nor powers nor things present nor things to come nor height Nor depth or any other created thing shall be able to separate us from the love of God Which is in Christ Jesus our Lord Here Paul gives a list of things which cannot separate us from the love of God So in the list of things which are mentioned Angels and demons are also mentioned and Paul very clearly says that these angels and demons Cannot separate us from the love of God. We are safe and secure in God So we do not have to be afraid of a of demons in any way We can overcome them through Christ and we also are safe in Christ's love God's love You know protects us and angels and demons cannot separate us from the love of God So this is the assurance that we are given so yes in 2nd Peter and in Jude We are warned not to be reckless in the way we talk about the demons that we are not supposed to slander Demons in the way we speak But at the same time we do not have to be afraid of them in any way The second thing that we need to keep in mind in our dealings with demons is that we are commanded to resist them and Fight them. We don't have to submit to them. We don't have to be afraid of them and think oh They are so powerful. What can a mere human being do against them? I know so no we are clearly commanded that we have the authority to resist them and also fight them So again, we look at a couple of scriptures which bring out this James 4 7 if someone could read out James 4 7 Therefore submit to God Resist the devil and he will flee from you So in this verse we are told that as long as we are living in obedient submission to the Lord We can resist the devil The devil and the demons cannot you know Take any action against us as long as we are living in Submission to the Lord as long as we are under his covering and his protection the demons cannot I know They cannot force us into sin or Meddle with our lives so we in Christ we can resist the devil So we are expected to resist the devil the second thing efficient step chapter 6 verse 12 Efficient 6 verse 12 For we do not wrestle against flesh and blood but against Principalities against powers against the rulers of the darkness of this age Against spiritual hosts of wickedness in the heavenly places So here we are told that we are engaged in a battle in a struggle with these Demonic forces here the demonic forces are are referred to as rulers as authorities as powers different names are given to them But the fact is that we are engaged in a battle with them And we have been given a heavenly armor that we can wear so that we will be able to fight them and overcome them successfully So to repeat once again We are told not to slander and speak against demons in a reckless careless manner Because even the archangel was very careful in the way he addressed the demons He only spoke in the name of God and said may the Lord rebuke you He did not just casually talk to the devil in any way that he wished But at the same time we never have to be afraid of them because God is for us And second we are we have the power to resist them We have the power to fight them and overcome them The third thing that we need to remember is that when we are directly speaking to the demons We only do it in the name of Jesus We have to understand that we are humans. We have no strength of our own We have no authority of our own Whatever strength we have is the strength which we have received from Jesus Whatever authority we have it is the authority which we carry because Jesus has delegated that authority to us So we cannot directly speak to the demons in our own strength or in our own authority We only approach them and deal with them in the name of Jesus by the authority and power Which he has given us against these creatures so Luke 10 17 to 19 brings out this teaching very well Luke 10 17 to 19 if someone could read out Then the 70 returned with joy saying Lord even the demons are subject to us in your name And he said to them I saw Satan fall like lightning from heaven Behold I give you the authority to trample on serpents and scorpions and over all the power of the enemy And nothing shall by any means hurt you. This is what Jesus says to the 72 Missionaries whom he has sent out and the same, I know Promise is there even for us today even as we are doing ministry Jesus says I have given you authority to Trample on snakes and scorpions and to overcome all The power of the enemy not just some of the power of the enemy But all the power of the enemy Jesus has promised I have given you authority to overcome all of the power of the enemy so we can You know Directly confront the demons in the name of Jesus and they will submit to us They will have to submit because we are Confronting them in the name of Jesus by the power and authority which he has given us so How do we exercise this authority in the name of Jesus when we are confronting I know demons Let's look at one negative Example which we find in Acts chapter 19 verses 13 to 16 acts 19 13 to 16.  I know and Paul. I know but who are you? Then the man in whom the evil spirit Was leaped on them overpowered them and prevailed against them so that they fled out of that house naked and wounded Now these seven sons of a Jewish chief priest They used the name of Jesus to confront the demons, but it did not work Why when in the earlier example, you know in Luke chapter 10 when the 72 Went and confronted the demons in the name of Jesus. They said joyfully to Jesus Lord in your when this When we used your name, they submitted to us So they were successful and the demons submitted to them when they used the name of Jesus However, these seven sons of the Jewish chief priest when they tried to use the name of Jesus It did not work. So what is the difference? The 72 were disciples Followers of Jesus. They had accepted Jesus as their Lord and master They were in submission and obedience to the Lord Jesus. So the Jesus gave them the authority To be able to overcome the demons on the other hand the seven sons of the Jewish chief priest They did not have any kind of a relationship with Jesus. They had not submitted to the Lord Jesus They had not made him their Lord and master. So the Jesus had not delegated them with any authority So you see when we Jesus name is not a magic word or a magic charm, which we use There's a relationship involved When we submit to the Lord and we live in obedience to him when we accept him as Lord and master Then he gives his followers the authority which they require like he promises in Luke 10 He says I have given you authority to overcome all the power of the enemy So that is why even in the earlier verses that we looked at James 4 7 it says submit yourselves Therefore to God Resist the devil and he will flee from you. There's always this This underlying principle that when you are living in submission to the Lord Jesus Then the authority which he delegates to you will be effective You will be able to walk in that authority and overcome any work of the evil one and the Evil one will have to submit to you because you have you're holding in your hand the authority with Jesus has given So when we use those words in Jesus name, it's not like a chant. It's not like a magic word It literally means in the authority with Jesus has given to me I am commanding you to come out of that person, you know, who is being demon possessed So when you see in Jesus name, you are Directly saying I am standing over here in the authority that Jesus has given to me and with that authority of Jesus I am commanding you to come out of that person who was possessed and the demons would have to submit So it is all about our submission to the Lord It is all about how much we are abiding in him It's all about how clearly we are hearing from him and following his instructions. So all that gives us that Authority and power to be able to overcome the evil one. So We do not have to be afraid of the demons We are in fact commanded to resist the demons and fight against the principalities and powers and third We are told that we can exercise authority over all the power of the evil one But how only in the name of Jesus in submission to him? Okay, so These so because of these three points, we do not have to fear the demons in any way. We can in fact overcome them Another thing that Another concept that maybe we can dwell upon is about this whole idea of guardian angels and There's only one single scripture, you know, which is used to talk about this Let's look at that scripture Matthew chapter 18 verse 10 Take heed that you do not despise one of these little ones for I say to you that in heaven Their angels always see the face of my father who is in heaven okay, so The reason that we are looking at all these different points is that we will have the right Perspective regarding angels. So the first thing we saw is that we should never worship the angels The second thing that we saw is that if any false doctrine is brought to us by the angels We must reject it The third thing that we saw is that we must not slander and speak Mockingly or carelessly about the demons and if we are talking to them We only do it in the name of Jesus. So those are the three things that we saw The fourth thing is to have the correct perspective regarding this whole idea of guardian angels Look at the wording which Jesus uses over here He's talking about, you know, children over here and then later on when we look in the in the in the in the same passage We see that he's not only talking about little children. He's also talking about believers Who are like little children belonging to God? Okay, so If you look at the the the same passage in Luke and in other places We see that the little ones doesn't only refer to little kids It also refers to God's little ones, you know, because you have that passage where it says if any of you Causes one of these little ones to stumble You know, may you know, may you be you know punished for it? So over there it's talking about believers and Jesus wants and says if anyone tries to you know Through false teachings if anyone tries to cause these little ones these believers to stumble Then you know God's judgment would come upon them. So In Matthew 18 10 Jesus says see that you do not despise one of these little ones Or I tell you that they're angels in heaven Always see the face of my father in heaven We have this very wrong idea that a you know, guardian angels are sitting around in our house Guarding us protecting us like as if they are watchmen But look at this verse Where are these angels located? Where are they situated?  They always see the face of my father in heaven So I'm not very sure about this concept of you know, one angel being assigned to one person There's no biblical backing for it It is talking about angels who have been assigned the duty of protecting God's people But I think they basically come to God's people whenever God sends them and says, you know go You know, you need to go and help so and so and so the angels come and do their work And they go back to heaven They go back and see the face of the father They are not watchmen sitting around inside your house doing guard duty. Okay, so, um I think maybe that would be a good way to look at this Simply because Jesus himself says for I tell you that they're angels in heaven Always see the face of my father in heaven. Okay, so, um We see many scriptures which talk about the angels coming and protecting guarding helping people on different occasions Second king's chapter six verse 17. It's not one angel who is sent at that time to, you know, protect Elisha Because you see this is a this is a very, um Personal incident involving one single person The king of Aram, um, is very worried that somebody among his, you know, um Inner circle is leaking information To the, uh, Israelites So he says who you know when we when we come up with strategies and plans on attacking the Israelites Somehow the Israelites get to know about it beforehand Which means somebody must be leaking the information And so then his people tell him it's nobody in your team is leaking the information It's uh god who reveals these things to Elisha And so the king of Aram sends an entire army against this one man of god, Elisha So in the morning, um, and they are basically in this place called Dothan And when in the morning when Elisha and his servant get up They see An entire army surrounding the city and that army has come there with one purpose To arrest one man and take him away as a prisoner So the servant Gehazi is very very worried and Elisha is not at all worried And Elisha says god has sent his angels to guard us So it's not one guardian angel who is now appointed as uh as a lifelong guardian angel for Elisha When the time of need came Angels were sent in fact an entire army of angels were sent to guard Elisha Another example that we see is Jesus himself When he's speaking, you know in the garden of Gethsemane He says if I want I can call Garden angels to come and guard me You know, I knew people will not be able to arrest me and he how many angels does he talk about? He talks about 12 legions of angels who will come to guard him So it's not like one garden angel who has been appointed If there's a time of need god will send how many of the legions of angels are required to take care of his people um, we see another Mention of you know angels being involved in people's lives That would be luke 16 22 In luke 16 22 we are told that when Lazarus the This is not Lazarus the you know the the brother of Martha and Mary. This is the Lazarus who was the beggar So when Lazarus the beggar dies in luke 16 22, it says that Several angels, you know, they come and they carry him to uh, abraham's bosom. So The idea that one each believer gets one garden angel May not be biblical simply because there's nothing in the scriptures which actually brings out that point On the other hand, we have many scriptures in the bible which talk about how god sends his angels Who is people to guard them help them protect them whenever there is a time of need? um, the only reason i'm trying to emphasize this is that Some people have a unhealthy interest in their guardian angels They kind of develop an emotional bond with their guardian angels You know, they are like, oh, this is angel watching over me. I wish I could see him. I wish I could talk to him I wish I could get to know him I think that's a very unhealthy emotional bond to form with any angel Our emotional bond should be with our lord jesus because he is far superior than any guardian angel And that's what we are told in fact in scriptures in hebrews one four This is what it says about our jesus hebrews one four if someone could read out having become so much Better than the angels as he has by inheritance obtained a more excellent name than they In hebrews one four, it's basically talking about how superior jesus is about the angels So it says he became as much superior to the angels as the name he has inherited is superior to theirs So as superior as jesus name is to that of the angels His superiority even in status is that superior What name has jesus been given that's actually mentioned in revelation 1916 where it says Revelation 1916 it says on his robe and on his thigh. He has this name written King of kings and lord of lords So even if you were to consider all these Principalities and powers and fallen angels as you know kings and lords He is king of kings and lord of lords. He's above all of them So the name which has been given to him is that Superior to all angelic beings So in his status in his position in his power. He is that superior to all angelic beings So rather than forming any kind of emotional bonds with your guardian angel who may not even be there You know because the scripture doesn't clearly say that each person is assigned one guardian angel Let our emotional bond and our trust be in jesus who is far superior to any any angelic beings So it is jesus who is our protector And he will send whatever angels are required in your time of need to take care of you We are told that very clearly in 2nd Thessalonians chapter 3 versus 2 and 3 2nd Thessalonians 3 versus 2 and 3 if someone could read out And we then that we may be Delivered from unreasonable and wicked men for not all Have faith for the Lord is faithful who will establish you and guard you from the evil one It says over here that the Lord is faithful He will protect you from the evil one So our faithful Lord, he will protect us. He will guard us. So let him be our guardian So, you know, let the our emotional attachment and our trust not be in the angels Who may have been assigned to us rather let our faith and let our trust be in our lord and savior Who it says over here Will protect us from the evil one So we are told in Hebrews 1 14 that You know, it says in Hebrews 1 4. Yeah, someone could read out that Hebrews 1 14 Are they not all ministering spirits sent forth to minister for those who will inherit salvation? Exactly these angels are ministering spirits who have been sent forth To serve those who will inherit salvation. So it's God who is sending forth these angelic beings So as and when we require their, you know, uh help They will be sent forth by God and um Hebrews 13 2 has another very interesting Um, you know thing to say about angels So, you know before we get into our break if we could just read that Hebrews 13 verse 2 Do not forget to entertain strangers for by doing so Some have unwittingly entertained angels So there are some occasions When the angels just don't come down to the earth in spirit form But they actually come in a physical body And you know, they merge among the humans looking human dressed like humans so He says over here, you know, the writer of Hebrews. He says on some occasions, you know You people might have actually shown hospitality not to a human being But actually an angel who, you know, who has come down over here in the form of a Uh in the form of a human in the sense, you know, they have come in the disguise of a human to accomplish some purpose of God So there may be occasions where a person needs actual literal physical help Where God would actually send an angel in in a physical form to assist that person And you know, we see we we hear we read these stories and testimonies of missionaries, you know in very difficult regions where literally Some stranger comes to them, you know, takes them through a war zone Takes them through some very dangerous territory and leaves them safely on the other side and then just disappears And when the person disappears, they realize oh, this was not a human who led us through the you know Through the dangerous war zone. It was an angel who actually led us So there are occasions where God So if God feels the need that, you know, you would require an actual angel in human form to come and help you He will actually do even that So the Lord will take care of us in every way. We are safe. We are protected We are loved greatly by our Lord and Savior Jesus Christ So let our faith and trust not be in angels But let our faith and trust be in our savior who is far superior to the angels And who will send the ministering spirits as and when they are required, you know to serve us um After the break will continue with some other, you know, um Correct perspectives that we should have regarding angels. So for now, we know, let's get into our break


Just one last question that yeah, you know Is there anything more question that's more important to you than whether or not this got exists No, and I guess this is my follow-up last question, sorry But if this is in fact the most important question to you shouldn't you have the most reliable way of coming to that conclusion? And why settle for anything less? All right, I Yeah, you have to have the most reliable way to figure it out But what's the most reliable way to know something that big, you know? Yeah, when you don't know the answer like I said I flip that coin to catch it. It's on the back of my hand I don't have enough information to come to a conclusion There's a chance that I don't know like as you said and I said isn't just an out or an option But is actually the best answer until we have enough conclusive evidence. I Don't know. Yeah It's a really uncomfortable Answer. No, no, it's actually a really that's a good question. Yeah, it's a really good question Would I don't know be a better answer with the guard to the existence of this God then I believe it But I'm waiting to be until I'm proven wrong by science Right isn't capable of proving it wrong in the first place. Yeah now that it's a good question now For instance on the coin. Yeah, that's the best answer, but then you like with God Yeah, and God's I mean with any religion. Yeah, I mean I don't know Isn't necessarily the The best it's not that you can't give the answer Why not because in these religions that you you have to be like, yeah, I believe in it You know, that's part of it. You have to believe in them. Why do you have to that's just part of the Thing


So I recall from a previous video that we defined the six trigonometric ratios, sine, cosine, tangent, cosecant, secant, and cotangent of an angle theta with respect to any terminal point, any point on the terminal side, up to proportionality. It doesn't matter which point you choose as long as you don't choose the origin. No, no, no, you can't do that one. So consider this diagram here. We have a terminal point x comma y for some angle theta by the Pythagorean equation. Since every angle, if it's in standard position, does kind of form a right triangle, the distance between the origin and the point will call that r. It can be found using the Pythagorean equation x squared plus y squared equals r squared. There's no ambiguity going on right there. And so we defined the six trigonometric ratios using all the possible combinations of x, y, and r here. So to remind ourselves of some things we saw, notice we saw that sine theta was equal to y over r. We also saw that cosecant theta was defined to be r over y. You'll notice that these fractions right here are actually just the same fraction but flipped upside down, y over r versus r over y. These are known as reciprocals. If we take the reciprocal of sine, we actually get cosine, a cosecant, excuse me. And so sine and cosecant are reciprocals of each other. And this gives us the first of what we refer to as a trigonometric identity, which the first one right here, this is one of the three reciprocal identities. What we mean by identity is that it doesn't matter which angle you put in for theta, cosecant of theta will always equal one over sine theta for any choice of angle theta whatsoever because these ratios are defined to actually be reciprocals of each other. Another example of this, let's take cosine, cosine we defined to be x over r, secant was also defined to be r over x for which this establishes that these are also reciprocals of each other. Secant is just cosine upside down and likely cotangent and tangent are also reciprocals of each other. For secant, we originally defined to be y over x and then cotangent we defined to be x over y. So those are, excuse me, x over y. They're reciprocals of each other. So that's something you're going to want to remember. Sine and cosecant are reciprocals, secant and cosine are reciprocals, and tangent and cotangent are reciprocals with each other. All right, another one, so those are the so-called three reciprocal identities. The other trigonometric identities I want to introduce in this video, which are in the same vein, are the two so-called quotient identities. So if we were to take the quantity sine theta divided by cosine theta, notice this looks like y over r divided by x over r, which as you take a fraction divided by a fraction, this means multiply by the reciprocal, y over r times r over x, for which the r on top and the r on bottom cancel out, and we get the simpler ratio y over x. But this ratio is none other than just the tangent ratio. So we see that sine theta divided by cosine theta is equal to tangent theta, or more simply, we just say tangent is sine over cosine. A similar calculation can be done with cotangent. That is, if I were to take cosine theta over sine theta, this will look like x over r divided by y over r. Canceling this, we're going to end up with x over y, which is exactly the cotangent ratio. So we see that sine over cosine gives us tangent and cosine over sine gives us cotangent, which just makes sense right here, because if you know this quotient identity right here and you take its reciprocal, then you're just going to get cotangent, right? So you flip this fraction upside down, you get cotangent. And so these are some of the simplest and most elementary of the trigonometric identities. So notice from this here that if I know the sine ratio, which is negative three-fifths for a specific angle, and I know the cosine ratio, which is four-fifths, turns out I can compute all of the trigonometric ratios. Because by the quotient identity, which we see right here, we see that tangent theta is just going to equal negative three-fifths divided by four-fifths. Simplifying the fraction, this becomes negative three-fifths, excuse me, negative three-fourths there, because the one-fifth on top cancels with the one-fifth on the bottom. So we're going to get tangent of theta to be negative three-fifths. Cotangent of theta, we have actually two ways to compute that. Cotangent, we could just take cosine divided by sine, or we could just take the reciprocal of tangent and we end up with negative four-thirds. So I guess this tangent, that gives us cotangent. We can get secant of theta. Secant is the reciprocal of cosine, so we get five over four. And we can also get cosecant, which is the reciprocal of sine, so we get negative five-thirds. And so if we know sine and cosine, it turns out we know all six trigonometric ratios because of the quotient identity, sometimes called the ratio identities, or the reciprocal identities. So because of this perspective, it turns out sine and cosine are the most important of the six trigonometric ratios.