Now then? So far we've looked at several different examples of satisfying conditions and running code. If that condition is satisfied. Now, what if we want to satisfy a combination of different conditions all at once in one set of brackets? Because at the minute we're just looking at one condition is the password length over X amount of characters. If we want to satisfy a combination of different conditions inside the same check, then we can use what's known as logical operators. And two of the main types are logical or which looks like two pipes and logical and which looks like two ampersands. So let's think about this. Imagine we want only this to run if the password length is at least 12 characters, but also includes an at symbol. So what we do is we place our logical and because we're checking two conditions, we want both of them to be true. We want the password length to be at least 12, and we also want it to include the at symbol. So we're going to say and using logical and password dot includes. We've seen this method before. This is the way we can check if something includes a certain character and we're looking for the at symbol. So then it's checking both of these conditions at the same time, if both of them are true. If it's at least 12 and includes this, then the whole thing will evaluate to true and this will fire if one of them is not true. So say, for example, it is at least 12, but it doesn't include this, then the whole thing will fail. It will be false and it won't fire. They both need to be true for this to work, for this, to be satisfied, this condition. Okay. So let me change this to something that's 12 characters long. One, two, three, four. And it includes this. In fact, we'll take that off for now and just do this, save it and we can see that password is long enough. So even though it's 12 characters, it doesn't include this. So this is not true and it goes to the next else if well, the password is at least eight characters. So it runs this so that if we now place in the at sign, then it should pass this first check because now both are true. If we save it and we can see that password is mighty strong. Okay, cool. So that's using the logical and operator, which is double ampersand. That's how we check two different conditions. And you could add a third one if you wanted to, although that would get a bit messy. Now then, let's have a look at all. So say for this second if check down here, we want to say, well, fire this code block If the password length is at least eight or and it's double pipe and the pipes are next to the space bar on most keyboards, you probably have to press shift and that key. So we're saying if password length is at least eight characters or if the password dot includes. The at symbol. Then we're going to find this code Block So even if this is four characters long, so it's not at least eight, then because we've said or only one of these conditions has to be true, and because it includes the at symbol over here and this is true, then this is fired. Okay? So if we save it and preview, we can see that password is long enough. Maybe this should be changed to strong enough and this should be strong. Okay. So when we use the Or operator, only one of the conditions has to be true. So we could change this to be password. And it's eight characters long but it's not this this is false but this is true. This must still pass because we're using all and only one of them has to be true. And we can see that password is strong enough. Now, if we wanted to, we could get really ambitious and try something like this. We could chain on an and over here and say password, dot length is over five. Okay, so what we're doing here is this is one condition and this is one condition because we've got an Or in between them. But this one condition over here is comprised of two different conditions. And both of those have to be true for this side of the or to work or to pass. Right. So if it includes an at symbol and it's at least five characters in length, then this side will pass. So if we change this back to four and we put an at symbol and we need to change this right here to greater than or equal to, if we save that now, then it's not going to pass because it's not at least five characters long and it has the at symbol, but this one doesn't pass. If we change it to one two, for example, then save it, then it does pass. Okay, so there we go. That is the logical or double pipe and the logical and and we can add these into our if checks to check a combination of different conditions. information alert Schedule learning time Learning a little each day adds up. Research shows that students who make learning a habit are more likely to reach their goals. Set time aside to learn and get reminders using your learning scheduler. About this course Learn Modern JavaScript from the very start to ninja-level & build awesome JavaScript applications. By the numbers Skill level: All Levels Students: 34156 Languages: English Captions: Yes Lectures: 188 Video: 20.5 total hours Certificates Get Udemy certificate by completing entire course Features Available on iOS and Android Description Hey gang, and welcome to your first step on the path to becoming a JavaScript ninja! In this course I'll be teaching you my absolute favourite language (JavaScript!) from the very beginning, right through to creating fully-fledged, dynamic & interactive web experiences. We'll cover all the basics to get you up-and-running quickly, before diving in to some of the really fun stuff like web-page manipulation, creating interactive forms, popups & other cool effects. Along the way we'll be using the latest additions to the JavaScript specification (ES6, 7 & beyond) and maintaining good coding standards to keep our code clean and effective! Once we master the basics, we'll dive into several real-life JavaScript projects, including an interactive quiz, a weather app, a real-time chat application and a small UI library you can use in all your future projects! We'll also take a look at some more advanced topics - object oriented programming, asynchronous code, real-time databases using Firebase (including a new chapter about Firebase 9) and much more. Finally, we'll be setting up a modern work-flow using Webpack & Babel, so that by the end of this course you'll be no less than a black-belt JavaScript developer with a lot of coding techniques in your tool-belt. Speaking of ninjas, I'm also known as The Net Ninja on YouTube, where you'll find hundreds of free coding tutorials, so feel free to pop by to say hello :). What you’ll learn Learn how to program with modern JavaScript, from the very beginning to more advanced topics Learn all about OOP (object-oriented programming) with JavaScript, working with prototypes & classes Learn how to create real-world front-end applications with JavaScript (quizes, weather apps, chat rooms etc) Learn how to make useful JavaScript driven UI components like popups, drop-downs, tabs, tool-tips & more. Learn how to use modern, cutting-edge JavaScript features today by using a modern workflow (Babel & Webpack) Learn how to use real-time databases to store, retrieve and update application data Explore API's to make the most of third-party data (such as weather information) Are there any course requirements or prerequisites? A basic grasp of HTML & CSS (how to create simple, static web pages) Who this course is for: New or junior developers who want to learn JavaScript from the ground up Front-end developers who want to level-up their JavaScript knowledge using modern, cutting-edge techniques Back-end developers who want to learn the JavaScript language for front-end development Instructor The Net Ninja (Shaun Pelling) Online Coding Tutor & Net Ninja A Little About Me... Hey gang, my name's Shaun and since a young age I've had an obsession for nearly anything tech-related. I've been coding since about the age of 15 (half of my life, now...phew!) and work as a full-stack web developer and online instructor. I also run a well-known development tutorial YouTube channel called The Net Ninja with nearly 1 million subscribers. So feel free to browse some of my latest free tutorials on there if you want to check out my teaching style :). My specialities mainly gravitate around one central language (and my first love) - JavaScript. I've been programming with it for around 12 years and - as with any long-term relationship - have had the pleasure of seeing it's ugly side as well as it's beautiful side. So I know the pitfalls to avoid when using it, and pass these on when appropriate in my tutorials. As well as teaching, I've also helped to create many very popular, UK-based eCommerce websites, as well as a large amount of smaller, independent websites as well. Other languages & technologies I use and teach are - Node.js, Vue, React, Python, Ruby, PHP, HTML & CSS.