1 00:00:00,740 --> 00:00:04,280 Welcome back, ladies and gentlemen, into this lecture, we're going to talk about JavaScript types 2 00:00:04,550 --> 00:00:06,700 and there are seven different JavaScript types. 3 00:00:07,040 --> 00:00:11,780 Now, we're not going to cover all of them, but we're going to cover the first three no strings and 4 00:00:11,780 --> 00:00:12,230 booleans. 5 00:00:12,740 --> 00:00:17,830 Then in future, we will cover undefined, no symbol and objects in Y say, in future. 6 00:00:17,840 --> 00:00:25,790 Well, because for these four or five, six and seven, we need to have a background knowledge for in 7 00:00:25,790 --> 00:00:26,790 order to understand them. 8 00:00:26,840 --> 00:00:32,240 That's the only reason I don't want to confuse you from the beginning of this section. 9 00:00:32,270 --> 00:00:38,750 OK, now in order to follow me in this section, it is preferrable for you to have installed a text 10 00:00:38,750 --> 00:00:40,280 editor or a code editor. 11 00:00:40,430 --> 00:00:42,740 So I'm going to use voice code now. 12 00:00:43,780 --> 00:00:50,110 How you can install viscose so you can type on Google vehicle and code that visual studio, that will 13 00:00:50,110 --> 00:00:51,630 be the link that you want to visit. 14 00:00:51,880 --> 00:00:58,450 And inside here, you can download for your for your operating system so you can install it for me. 15 00:00:58,660 --> 00:00:59,910 I have already done it. 16 00:00:59,920 --> 00:01:02,350 And it's for Mac and you. 17 00:01:02,350 --> 00:01:05,650 If you're using windows, it will here, it will say for Windows. 18 00:01:05,830 --> 00:01:13,210 OK, now some students will ask me why I'm telling you this again, because in some of the other sections, 19 00:01:13,360 --> 00:01:16,330 I would probably say that you need to have installed a. 20 00:01:16,810 --> 00:01:22,630 Well, the thing is that the students will skip some of the sections in when they see me using something 21 00:01:22,630 --> 00:01:26,470 they haven't installed on their machines, they will start asking me questions. 22 00:01:26,480 --> 00:01:32,800 That's the only reason now why I'm using Vasko throughout this course, because it's very lightweight 23 00:01:32,950 --> 00:01:34,920 and it's very supportive. 24 00:01:34,930 --> 00:01:37,360 It has a lot of extensions here. 25 00:01:37,510 --> 00:01:37,920 Right. 26 00:01:37,960 --> 00:01:42,220 And also building it, you can run and debug and it's Intellisense. 27 00:01:42,220 --> 00:01:42,710 Very good. 28 00:01:43,000 --> 00:01:43,870 Now, you don't know. 29 00:01:44,440 --> 00:01:46,330 You don't need to know everything of this. 30 00:01:46,450 --> 00:01:56,650 OK, so why I'm going to use this code one more time is because there I will want to write JavaScript 31 00:01:56,650 --> 00:01:58,420 code here and save it in files. 32 00:01:58,600 --> 00:02:02,860 So those files after that, you can access them and you can change them. 33 00:02:02,860 --> 00:02:05,020 You can modify them, you can refresh your memory. 34 00:02:05,120 --> 00:02:06,520 You can do your exercise. 35 00:02:06,700 --> 00:02:07,550 That's the only thing. 36 00:02:07,870 --> 00:02:15,000 Now, one more thing that I want to show you is that you can run the JavaScript code even in your browser. 37 00:02:15,100 --> 00:02:15,480 Right. 38 00:02:15,940 --> 00:02:21,260 So if you open Google dot com and if you inspect it, you will see here a console tab. 39 00:02:21,400 --> 00:02:26,830 So if you go in the console tab now here you can write a code. 40 00:02:26,830 --> 00:02:31,070 For example, let's do basic mathematical operation nine plus six. 41 00:02:31,180 --> 00:02:32,440 That will be 15. 42 00:02:32,560 --> 00:02:32,920 Right. 43 00:02:33,040 --> 00:02:40,240 So you need to hit, return or enter because before it was light blue, four in my browser, for example, 44 00:02:40,240 --> 00:02:41,280 here, this is 13. 45 00:02:41,410 --> 00:02:47,660 But when I hit return on Macs or enter in windows, you will see this as a dark blue. 46 00:02:47,680 --> 00:02:50,780 OK, that is pretty much what I want to show you. 47 00:02:51,120 --> 00:02:52,720 Now, how are we going to do this? 48 00:02:53,880 --> 00:03:01,260 First things first, you need to have on your desktop to see to download these JavaScript Genesis file 49 00:03:01,260 --> 00:03:04,650 folder and in this directory here, I do have two things. 50 00:03:05,040 --> 00:03:09,990 Final will contain all of those lecture's exercises, solutions. 51 00:03:10,200 --> 00:03:11,580 But Starger will be empty. 52 00:03:11,580 --> 00:03:14,540 And I'm going to do I'm going to start with the starter. 53 00:03:14,550 --> 00:03:14,840 Right. 54 00:03:15,000 --> 00:03:19,670 But you will need the final one in order to see all of the exercises. 55 00:03:19,830 --> 00:03:26,460 So I want you after each and every lecture to go there and to see if that lecture has exercise and do 56 00:03:26,460 --> 00:03:26,780 them. 57 00:03:26,790 --> 00:03:29,070 And also there are solutions if you are stuck. 58 00:03:29,580 --> 00:03:30,140 Very good. 59 00:03:30,150 --> 00:03:36,750 I'm just do I mean, shift your folder on your desktop. 60 00:03:36,760 --> 00:03:38,000 So mine is on desktop. 61 00:03:38,280 --> 00:03:40,100 So here I'm going to say open folder. 62 00:03:40,140 --> 00:03:40,520 Good. 63 00:03:41,040 --> 00:03:43,980 I'm going to navigate to desktop starter hit enter. 64 00:03:44,190 --> 00:03:45,690 This is how you use this code. 65 00:03:45,870 --> 00:03:46,330 Nice. 66 00:03:46,740 --> 00:03:48,570 So inside here we're going to create a file. 67 00:03:48,570 --> 00:03:50,190 There is a plus symbol or right. 68 00:03:50,190 --> 00:03:52,640 Click new file I'm going to use here. 69 00:03:52,650 --> 00:04:00,210 I'm going to create index that HTML file in here, start typing doc he tap and it will give you the 70 00:04:00,210 --> 00:04:01,280 entire document. 71 00:04:01,590 --> 00:04:05,330 Now the title you can change the title, whatever title you want. 72 00:04:05,640 --> 00:04:07,680 For example, just put it here. 73 00:04:07,860 --> 00:04:11,550 Java script fundamentals. 74 00:04:13,050 --> 00:04:13,680 Very good. 75 00:04:13,920 --> 00:04:22,770 And in the body you can type each one tack and say OK, say again, JavaScript, Genesis. 76 00:04:25,220 --> 00:04:28,550 Fundamentals are very good now. 77 00:04:29,720 --> 00:04:36,770 That is pretty much what I want you to have in this file, so I'm going to use this one right. 78 00:04:36,960 --> 00:04:42,620 And so probably you need to install the live server. 79 00:04:42,920 --> 00:04:50,000 So go here on the extension step in heat like server. 80 00:04:50,960 --> 00:04:56,690 And here it is, lunch mine has already been installed, but you will see here install. 81 00:04:56,840 --> 00:04:57,190 Right. 82 00:04:57,350 --> 00:04:58,550 So install that one. 83 00:04:58,790 --> 00:05:03,650 If you need to close your viscose, close it just to restart it. 84 00:05:04,040 --> 00:05:05,290 And you're good to go. 85 00:05:05,300 --> 00:05:07,190 So I need this live server. 86 00:05:07,370 --> 00:05:12,650 So here you can actually activate this life server, go right. 87 00:05:12,650 --> 00:05:18,520 Click and open with live server or there is a shortcut. 88 00:05:19,370 --> 00:05:19,670 Good. 89 00:05:19,790 --> 00:05:24,290 Just open with life server and here it is, JavaScript Genesis Fundamentals. 90 00:05:24,560 --> 00:05:27,510 This is coming from the H1 track that we wrote. 91 00:05:28,050 --> 00:05:31,630 OK, now what I'm going to write here, another file. 92 00:05:31,790 --> 00:05:32,900 Let me do it like this. 93 00:05:33,170 --> 00:05:35,240 And you called lecturer. 94 00:05:36,560 --> 00:05:43,130 Um, yeah, lecture one, dash one, that is this how are we going to name our lectures? 95 00:05:43,520 --> 00:05:47,760 And this lecture is a JavaScript file. 96 00:05:47,780 --> 00:05:53,930 Now, I just want to tell you that we do have a couple of ways how we can write JavaScript in our browser. 97 00:05:54,200 --> 00:05:58,210 And the first thing is that we can do external files. 98 00:05:58,250 --> 00:05:59,720 This is called external files. 99 00:05:59,840 --> 00:06:05,660 But in order for this to work, I am going to tell you that we need to load them here. 100 00:06:05,840 --> 00:06:10,580 So first we need to say script and we need to close this one. 101 00:06:10,610 --> 00:06:17,430 Now, in the script that we have source and the source will be our current directory, not forward slash. 102 00:06:17,810 --> 00:06:19,670 And that will be lecture one. 103 00:06:19,670 --> 00:06:21,070 That J is very good. 104 00:06:21,260 --> 00:06:23,360 And also we need to specify the type. 105 00:06:23,360 --> 00:06:34,520 So Browser will know what to expect that that will be text and forward slash JavaScript, JavaScript 106 00:06:34,730 --> 00:06:43,730 cuz now our JavaScript file, external JavaScript file is connected with this file here. 107 00:06:43,730 --> 00:06:44,090 Right. 108 00:06:44,110 --> 00:06:46,440 So there's other ways, but they're very basic. 109 00:06:46,490 --> 00:06:48,980 I'm going to tell you in future you don't have to worry about it. 110 00:06:49,280 --> 00:06:49,760 Right. 111 00:06:49,800 --> 00:06:58,340 OK, now about JavaScript times, you can make a comment in JavaScript to forward slash and type JavaScript 112 00:06:59,600 --> 00:07:00,080 types. 113 00:07:00,380 --> 00:07:06,430 OK, now the first one that I want you to know is called the number. 114 00:07:06,650 --> 00:07:09,440 So why is this very useful? 115 00:07:09,680 --> 00:07:12,290 OK, this is one of the basic ones. 116 00:07:12,560 --> 00:07:17,300 So with numbers, we can do basic math operation, for example. 117 00:07:17,480 --> 00:07:20,910 We can just calculate how much is three plus seven. 118 00:07:20,930 --> 00:07:21,830 OK, just do it. 119 00:07:21,830 --> 00:07:25,780 Three plus seven semicolon and put a semicolon there. 120 00:07:26,150 --> 00:07:26,780 Save it. 121 00:07:27,950 --> 00:07:29,660 Or if you don't see me. 122 00:07:30,950 --> 00:07:33,440 So here there is a bubble that means they have and save it. 123 00:07:33,440 --> 00:07:33,680 No. 124 00:07:33,770 --> 00:07:38,900 So now you need to also before checking your code, you need to save it. 125 00:07:38,990 --> 00:07:47,330 So control s or command as in as is or control as in windows and that will save the file. 126 00:07:47,350 --> 00:07:48,560 So there is no bubble there. 127 00:07:48,860 --> 00:07:49,220 Right. 128 00:07:49,400 --> 00:07:52,760 But now if you go here and if you refresh if you. 129 00:07:52,760 --> 00:07:53,120 Right. 130 00:07:53,120 --> 00:07:54,740 Click inspect. 131 00:07:56,000 --> 00:08:02,660 In the console, there is nothing there in why's this before, remember, we just rode three plus seven 132 00:08:02,870 --> 00:08:05,200 and it would give us the result. 133 00:08:05,540 --> 00:08:10,760 But now I'm using the direct console here, this terminal here. 134 00:08:10,760 --> 00:08:13,720 But in code, I don't have access to that. 135 00:08:13,940 --> 00:08:21,500 So if you if you want to print out something to the browser here, which I can just delete it here, 136 00:08:22,250 --> 00:08:23,950 let me just delete like that. 137 00:08:24,320 --> 00:08:32,000 OK, so I need to write console console that log and put this one in brackets. 138 00:08:32,000 --> 00:08:35,060 Now save it again and just go back here. 139 00:08:35,060 --> 00:08:35,840 And here it is. 140 00:08:36,020 --> 00:08:38,480 You do have 10 actually with live server. 141 00:08:38,480 --> 00:08:42,840 You don't have to you don't have to refresh because it's going to work out comedically. 142 00:08:43,220 --> 00:08:46,160 So with numbers we can do basic maths operation. 143 00:08:46,460 --> 00:08:47,260 What else we can do? 144 00:08:48,290 --> 00:08:49,520 Let's try something else. 145 00:08:49,520 --> 00:08:52,400 Let's cancel the lock loops console. 146 00:08:52,880 --> 00:08:56,630 So we use console the log every time we want to show something. 147 00:08:56,630 --> 00:08:56,910 Right. 148 00:08:57,110 --> 00:09:01,100 So ten minus nine, save it. 149 00:09:02,030 --> 00:09:02,250 Right. 150 00:09:02,300 --> 00:09:03,800 A couple of them console that log. 151 00:09:05,280 --> 00:09:09,570 Not long, and here we are going to say 10 times three. 152 00:09:11,050 --> 00:09:16,090 So let's divide something on the log, divide 20. 153 00:09:17,930 --> 00:09:19,380 Divided by five. 154 00:09:19,700 --> 00:09:31,310 OK, now save it, go back to your browser and you will see that I have 10 one 30 and for good for it's 155 00:09:31,310 --> 00:09:33,020 coming twenty divided by five. 156 00:09:33,020 --> 00:09:36,830 It's for ten times three is going to be thirty. 157 00:09:37,220 --> 00:09:38,810 And this will be one. 158 00:09:38,930 --> 00:09:40,840 And the first one will be ten. 159 00:09:41,160 --> 00:09:45,530 OK, so if you want to write it, we can achieve the same thing here. 160 00:09:45,530 --> 00:09:47,810 Ten times three it will be equal. 161 00:09:47,810 --> 00:09:52,700 Thirty, ten minus nine it will be one in twenty. 162 00:09:52,700 --> 00:09:55,580 Divided by five it will be four in. 163 00:09:55,580 --> 00:09:56,480 How does this leave. 164 00:09:56,480 --> 00:09:57,650 A server is working. 165 00:09:57,650 --> 00:09:59,030 It will create a new URL. 166 00:09:59,030 --> 00:10:03,350 This will be our local localhost actually our local machine and it will give us a port. 167 00:10:03,350 --> 00:10:04,820 Maybe you're going to have a different port. 168 00:10:05,010 --> 00:10:09,530 It doesn't matter in the HDMI is the file that I've created. 169 00:10:09,620 --> 00:10:13,940 This one so you can hear here, exclamation mark, save it again. 170 00:10:14,810 --> 00:10:15,770 And there you go. 171 00:10:15,770 --> 00:10:17,150 The changes are already there. 172 00:10:17,360 --> 00:10:23,990 And plus everything that we have done here in this is also printed out here. 173 00:10:24,020 --> 00:10:24,350 Right. 174 00:10:24,500 --> 00:10:37,340 OK, now, so let me quickly show you something else so we can do more complex operations like using 175 00:10:39,050 --> 00:10:40,910 brackets or small brackets. 176 00:10:40,910 --> 00:10:50,030 So console's along, for example, more complex operation is five minus two that will be multiplied 177 00:10:50,030 --> 00:10:55,490 by by four minus. 178 00:10:57,240 --> 00:11:04,290 Let's say to right, maybe that's not a good example, let's do it here, six, six, minus two. 179 00:11:05,550 --> 00:11:07,440 So how this will work? 180 00:11:07,470 --> 00:11:14,820 Well, if you know, Max, these first six minus two will be calculated, it will be four, then four, 181 00:11:14,820 --> 00:11:15,480 minus two. 182 00:11:15,480 --> 00:11:17,780 It will be calculated, it will be two. 183 00:11:17,880 --> 00:11:22,380 And after that, whatever it's in the brackets, we can multiply it right. 184 00:11:22,470 --> 00:11:27,810 So we can just six minus two, four times four. 185 00:11:28,260 --> 00:11:34,730 So we can't we first need to work in the brackets and after that, just to calculate this one. 186 00:11:34,740 --> 00:11:35,340 So save it. 187 00:11:35,610 --> 00:11:38,190 So this should be four times two. 188 00:11:38,190 --> 00:11:39,270 Should be eight. 189 00:11:39,870 --> 00:11:40,240 Right. 190 00:11:40,300 --> 00:11:41,510 And here is the result. 191 00:11:41,790 --> 00:11:42,590 That is cool. 192 00:11:42,780 --> 00:11:48,510 So we can do a more complex math functions here right now. 193 00:11:48,720 --> 00:11:50,020 Let's talk about module. 194 00:11:50,040 --> 00:11:51,200 Now, what is module? 195 00:11:51,360 --> 00:11:53,460 Well, module gives you the reminder. 196 00:11:53,760 --> 00:11:55,400 So let's write in the console. 197 00:11:55,620 --> 00:11:57,570 So for this, I'm going to show you in the console. 198 00:11:57,570 --> 00:12:02,430 Right, just to make just to make you practice that we can even use the condom. 199 00:12:02,440 --> 00:12:04,550 So 16 Modula. 200 00:12:06,150 --> 00:12:11,370 And seven, and that will give me to why? 201 00:12:11,730 --> 00:12:14,340 Well, seven can be contained two times. 202 00:12:14,730 --> 00:12:22,710 So two times, two times seven it will be 14 and 16, minus 14 is two. 203 00:12:22,710 --> 00:12:25,770 So Modula will give us the reminder, right. 204 00:12:26,010 --> 00:12:27,450 The reminder of 16. 205 00:12:27,570 --> 00:12:32,770 So how many times seven can be contained in 16 times and two times 17. 206 00:12:33,120 --> 00:12:36,180 So let's do this two time seven, not 17. 207 00:12:36,330 --> 00:12:37,500 It will be 14. 208 00:12:37,650 --> 00:12:39,990 So 14 minus 16. 209 00:12:39,990 --> 00:12:41,380 That will give us the reminder. 210 00:12:41,400 --> 00:12:45,180 So that is how we can use model right now. 211 00:12:45,990 --> 00:12:47,640 That is pretty much with numbers. 212 00:12:47,650 --> 00:12:52,420 Let's do the second JavaScript type and that will be string. 213 00:12:53,370 --> 00:12:54,480 Now, what are strings? 214 00:12:55,260 --> 00:12:59,310 So string is text in JavaScript needs to know if you are writing text. 215 00:12:59,610 --> 00:13:03,420 And for this we need to use single or double quotes. 216 00:13:03,510 --> 00:13:07,730 So that log and let's say I just want to print out my name. 217 00:13:07,740 --> 00:13:08,130 Rick. 218 00:13:09,000 --> 00:13:09,330 Good. 219 00:13:09,480 --> 00:13:12,150 Now use single quotes, but you can use double quotes. 220 00:13:12,330 --> 00:13:13,720 Let's see if it is Rick. 221 00:13:14,370 --> 00:13:18,260 Now what we can do, we can cancel out my last name. 222 00:13:18,570 --> 00:13:19,710 Let's use double quotes. 223 00:13:19,720 --> 00:13:20,930 It's not going to change anything. 224 00:13:22,590 --> 00:13:26,850 Make sure that when you use double quotes here, you need to use double quotes at the end. 225 00:13:26,850 --> 00:13:27,510 So save it. 226 00:13:28,200 --> 00:13:28,850 Here it is. 227 00:13:29,310 --> 00:13:31,500 Now we can do something more interesting. 228 00:13:31,500 --> 00:13:33,510 Let's do cancel the log. 229 00:13:33,870 --> 00:13:35,730 So strings are very interesting to you. 230 00:13:35,740 --> 00:13:41,790 So I'm going to say Rick here, plus Lewski, my last name. 231 00:13:42,300 --> 00:13:47,760 And so this here is not consider as a mathematical symbol. 232 00:13:48,120 --> 00:13:51,060 So this here is considered as concatenation. 233 00:13:51,300 --> 00:13:59,390 And what it will do, it will it will combine it will actually glue Rick in Sokolsky together so those 234 00:13:59,400 --> 00:14:03,030 the two strings will be attached one to each other. 235 00:14:03,390 --> 00:14:04,650 And this is not good. 236 00:14:04,890 --> 00:14:06,900 But what we can do, we can fix it. 237 00:14:06,900 --> 00:14:10,680 What are we can do space here that will fix it. 238 00:14:10,680 --> 00:14:11,070 Right. 239 00:14:11,430 --> 00:14:12,960 Or we can get. 240 00:14:14,170 --> 00:14:20,050 With space here, that will fix it, but sometimes you will see that some people are doing this. 241 00:14:21,420 --> 00:14:27,030 Should they making an empty string here, right, so it's a space between but again, they need to use 242 00:14:27,030 --> 00:14:29,450 the plus sign to concatenate with this one. 243 00:14:29,610 --> 00:14:33,390 So the empty string will be concatenated with the first part, right. 244 00:14:33,510 --> 00:14:34,050 This one. 245 00:14:34,620 --> 00:14:37,090 But also the empty strings need to be concatenated. 246 00:14:37,140 --> 00:14:37,680 Second part. 247 00:14:37,820 --> 00:14:41,040 So save that and it will yield the same result. 248 00:14:41,460 --> 00:14:42,080 Very good. 249 00:14:42,810 --> 00:14:43,170 But. 250 00:14:44,500 --> 00:14:50,000 So I used single quotes, but what if I want to do another quote inside? 251 00:14:50,020 --> 00:14:52,420 So, for example, I own something. 252 00:14:52,420 --> 00:14:54,640 So it's Rick's car, for example. 253 00:14:54,640 --> 00:14:55,080 Let's do it. 254 00:14:55,090 --> 00:14:58,060 Cancel that law and let's write Rick's. 255 00:15:01,480 --> 00:15:08,380 Like that, and it's not allow me a car, should I have it here, so let's change this to double quotes 256 00:15:08,380 --> 00:15:08,710 here. 257 00:15:10,310 --> 00:15:10,850 Nice. 258 00:15:11,700 --> 00:15:19,700 So this should work, but in the past it wasn't working because I use double quotes and single quotes 259 00:15:19,940 --> 00:15:24,750 together, but if I use single quotes, then I do have a real big problem. 260 00:15:25,010 --> 00:15:27,000 Now, why do we have a real big problem? 261 00:15:27,020 --> 00:15:35,980 Well, in JavaScript, we can use something that, Wolf, will ignore this quote. 262 00:15:35,990 --> 00:15:40,060 So the solution is to use backslash. 263 00:15:40,340 --> 00:15:42,200 So we use backslash here. 264 00:15:42,350 --> 00:15:48,020 And what we are basically saying to the compiler, OK, what's after the backslash consider is a normal 265 00:15:48,020 --> 00:15:51,320 stream so that now the S this one. 266 00:15:52,420 --> 00:15:58,960 Will be considered as normal, so riska, no more problems, right? 267 00:15:59,080 --> 00:15:59,500 So. 268 00:16:00,540 --> 00:16:06,150 By using the backslash, we can escape the quote and we can tell the compiler to ignore it and just 269 00:16:06,150 --> 00:16:09,070 want to use the tactic to be included. 270 00:16:09,090 --> 00:16:12,300 So that's why we use we need to use the backslash. 271 00:16:12,700 --> 00:16:16,020 OK, now, another awesome scenario here. 272 00:16:16,030 --> 00:16:17,090 I forgot the semicolon. 273 00:16:17,400 --> 00:16:18,960 Make sure that you write semicolons. 274 00:16:18,960 --> 00:16:25,220 It will work without semicolons, but it's always good at the end of the expression to write semicolons. 275 00:16:25,490 --> 00:16:28,860 OK, now let's consider one awesome scenario. 276 00:16:29,160 --> 00:16:35,820 What we think will happen if we try to combine numbers, something that we have done here and strings. 277 00:16:35,850 --> 00:16:37,160 So cancel that lot. 278 00:16:37,500 --> 00:16:38,640 Let's do it like this. 279 00:16:38,910 --> 00:16:47,400 So let's say thirty three plus years now save it and let's go back here and it's saying thirty three 280 00:16:47,400 --> 00:16:51,840 years, even if I put here space, still going to be thirty three years. 281 00:16:51,840 --> 00:16:52,160 Right. 282 00:16:52,440 --> 00:16:55,380 So why this is happening. 283 00:16:55,860 --> 00:16:57,020 Why this result. 284 00:16:57,330 --> 00:16:59,880 Well JavaScript will convert the number to a string. 285 00:17:00,830 --> 00:17:07,310 This number two, a string one, because the plus sign will tell the JavaScript compiler, OK, we have 286 00:17:07,310 --> 00:17:11,240 no in the string and the plus side probably means concatenation. 287 00:17:11,420 --> 00:17:14,990 And that's why it will glue this the same as we did here. 288 00:17:15,110 --> 00:17:15,470 Right. 289 00:17:15,740 --> 00:17:17,390 So that is pretty much it. 290 00:17:17,420 --> 00:17:23,660 So this plus sign doesn't mean mathematical operation in this because we don't have two numbers. 291 00:17:23,810 --> 00:17:28,400 And it say because we do have a string together with a number, let's do a concatenation. 292 00:17:28,460 --> 00:17:34,300 So it doesn't matter what you're going to put in, it's going to be considered as concatenation. 293 00:17:34,310 --> 00:17:35,540 That is pretty much it. 294 00:17:35,720 --> 00:17:38,150 Now, the thirty three it's not. 295 00:17:38,150 --> 00:17:39,010 No, here it is. 296 00:17:39,010 --> 00:17:39,830 It's a different color. 297 00:17:40,070 --> 00:17:47,210 It's converted back to a string, so it's automatically converts 33 to string because it's not addition. 298 00:17:47,210 --> 00:17:50,480 It's concatenation and that depends on the circumstances. 299 00:17:50,720 --> 00:17:53,600 Now what if we do another scenario? 300 00:17:53,610 --> 00:17:54,280 Copy this. 301 00:17:55,050 --> 00:17:59,770 Well let's put here thirty three minus just like this. 302 00:18:00,410 --> 00:18:05,240 What if I have here a number in quotes that is considered as a string. 303 00:18:05,240 --> 00:18:05,530 Right. 304 00:18:05,540 --> 00:18:06,110 Save it. 305 00:18:06,320 --> 00:18:07,590 But let's see what will happen. 306 00:18:08,210 --> 00:18:08,650 Wow. 307 00:18:08,660 --> 00:18:09,560 Something strange. 308 00:18:09,740 --> 00:18:11,420 Now I do have a blue twenty three. 309 00:18:11,420 --> 00:18:14,490 That means it's a number in why this is happening. 310 00:18:14,510 --> 00:18:18,590 Well we don't have anything for concatenation. 311 00:18:18,590 --> 00:18:25,580 The plus sign can be used for mathematical operations like this, but also when we try to glue or attach 312 00:18:25,580 --> 00:18:26,900 the strings to each other. 313 00:18:27,080 --> 00:18:29,320 But here with the minus there is a different story. 314 00:18:29,600 --> 00:18:36,260 The compiler will say, OK, whatever you have in the bracket, just consider it to be as a number because 315 00:18:36,560 --> 00:18:42,680 we don't use no minus or this symbol here for concatenation. 316 00:18:42,680 --> 00:18:45,350 And that's why it will convert this string to a number. 317 00:18:45,620 --> 00:18:49,250 And yeah, we will have back and no result. 318 00:18:49,790 --> 00:18:53,150 Now, the last thing that I want to discuss today is. 319 00:18:54,550 --> 00:19:05,140 William JavaScript, that's so boolean is also true or false, so Boolean is used by our computers. 320 00:19:05,410 --> 00:19:12,850 If you have done some EITE qualification, you will know that the entire computer code is written using 321 00:19:12,850 --> 00:19:14,070 ones and zeros. 322 00:19:14,500 --> 00:19:14,950 So.