1
00:00:00,900 --> 00:00:05,640
So we've only just begun javascript and it's already time for our first quick problem set.

2
00:00:05,640 --> 00:00:11,370
So there are three challenges here and I'd like for you to try to do them without any code without running

3
00:00:11,370 --> 00:00:13,080
them in the browser and the console.

4
00:00:13,110 --> 00:00:14,480
That's not the point here.

5
00:00:14,520 --> 00:00:20,250
What really we're trying to do is check for your conceptual understanding of the percentage sign or

6
00:00:20,310 --> 00:00:25,490
the plus sign between two strings or the square brackets or link and the double backslash.

7
00:00:25,740 --> 00:00:31,920
So go ahead and try evaluating these mentally and pause video and then following this we'll have solutions

8
00:00:31,940 --> 00:00:33,140
.

9
00:00:34,320 --> 00:00:38,130
OK so I'm going to go ahead and start discussing the first problem here.

10
00:00:38,160 --> 00:00:43,600
So 100 maade three modules over remember is the remainder operator.

11
00:00:43,800 --> 00:00:48,150
So we divide three into 100 as many times as he can go in.

12
00:00:48,150 --> 00:00:50,690
So that is going to be 33 times.

13
00:00:50,940 --> 00:00:57,630
And then we subtract 33 times three which is ninety nine from 100 and we get 1.

14
00:00:57,960 --> 00:01:02,250
So divide 3 in as many times as possible and then take the remainder.

15
00:01:02,250 --> 00:01:04,250
So that should be 1.

16
00:01:04,440 --> 00:01:14,100
So if we want to run this in our council we can go ahead and do 100 maade 3 and we get 1.

17
00:01:14,190 --> 00:01:15,330
All right.

18
00:01:15,330 --> 00:01:17,120
So let's move on to the second one now.

19
00:01:17,730 --> 00:01:21,540
We have the string blah that is being added to another string blah.

20
00:01:21,630 --> 00:01:23,520
Remember that's called concatenation.

21
00:01:23,790 --> 00:01:27,560
And because we have the parentheses around it that will happen first.

22
00:01:27,570 --> 00:01:35,760
So that's basically the equivalent of running law plus law which will just give us blah blah no space

23
00:01:36,480 --> 00:01:41,800
and then we're adding the square brackets onto that character 6.

24
00:01:42,030 --> 00:01:47,570
So that's going to be the sixth index which is actually the seventh character because it starts 0.

25
00:01:47,730 --> 00:01:55,490
So we would end up with 0 1 2 3 4 5 6 the letter A.

26
00:01:55,830 --> 00:01:57,870
And that's what we get just to verify.

27
00:01:57,870 --> 00:02:00,260
I'll just run the entire line.

28
00:02:00,360 --> 00:02:00,630
Great.

29
00:02:00,630 --> 00:02:01,900
And we get the letter A.

30
00:02:02,370 --> 00:02:04,040
So let's move on to the final one here.

31
00:02:04,230 --> 00:02:05,800
So this one's a little bit trickier.

32
00:02:05,820 --> 00:02:11,160
It actually combines numbers and strings together in one expression here.

33
00:02:11,190 --> 00:02:13,290
So we start just on the left side.

34
00:02:13,380 --> 00:02:15,030
Hello hotlink.

35
00:02:15,390 --> 00:02:18,520
So that's going to be one two three four five.

36
00:02:18,960 --> 00:02:28,680
So we end up with five books modulo And then this one is even trickier because it looks like it's four

37
00:02:28,680 --> 00:02:31,890
characters length on those four characters.

38
00:02:31,890 --> 00:02:40,680
But in actuality when we run this string and I hit enter it comes back to me as just three characters

39
00:02:41,010 --> 00:02:43,740
and that's because we're escaping this backslash.

40
00:02:43,740 --> 00:02:51,240
Just like if I did backslash double quote The backslash goes away and we end up with our double quote

41
00:02:51,270 --> 00:02:52,160
inside.

42
00:02:52,740 --> 00:02:58,990
So if we evaluate this we end up with five maade three.

43
00:02:59,520 --> 00:03:03,920
And that of course three goes into five one time with the remainder of two.

44
00:03:04,140 --> 00:03:07,190
So if we try that out we should get two.

45
00:03:07,530 --> 00:03:08,390
And we do.

46
00:03:08,940 --> 00:03:09,540
OK.

47
00:03:09,540 --> 00:03:13,620
So hopefully you enjoy those super quick exercises very soon.

48
00:03:13,620 --> 00:03:19,530
These exercises will then become making a tic tac toe game making a blog app all sorts of fun things

49
00:03:19,530 --> 00:03:20,490
using javascript.

50
00:03:20,640 --> 00:03:21,660
But we have to start small
