1 00:00:00,480 --> 00:00:06,300 OK, we'll welcome back to the course now we're on Section two lessons, seven online resources. 2 00:00:06,900 --> 00:00:13,530 So the purpose of this is just to show you that if you are stuck in JavaScript or you don't understand 3 00:00:13,530 --> 00:00:19,290 what some word means, or you need to see an example of some of the code in action so that you can fix 4 00:00:19,290 --> 00:00:25,080 a problem, then there are tons of resources online and these are just the three biggest ones. 5 00:00:25,500 --> 00:00:26,790 But there are many others. 6 00:00:26,790 --> 00:00:30,740 And you can check tons of examples of projects that are out there. 7 00:00:31,020 --> 00:00:32,810 But let's get started with just these three. 8 00:00:33,660 --> 00:00:41,280 So three schools and this is from the W3 Foundation, and they're actually very central to just education 9 00:00:41,280 --> 00:00:42,630 on the Internet in general. 10 00:00:43,170 --> 00:00:46,020 So they have this wonderful website of three schools, dot com. 11 00:00:46,680 --> 00:00:49,170 And then we'll also look at the Mozilla developer network. 12 00:00:49,170 --> 00:00:55,440 And this is great because, well, the founder of Mozilla, which is the creator of the Firefox browser, 13 00:00:55,800 --> 00:00:56,850 that's Brendan Eich. 14 00:00:56,860 --> 00:00:59,670 And so he was the one that created JavaScript. 15 00:00:59,670 --> 00:01:02,780 So that's why this is an amazing resource for JavaScript as well. 16 00:01:03,540 --> 00:01:04,950 And then there's a stack overflow. 17 00:01:05,780 --> 00:01:13,110 This is a wonderful website from Stock Exchange, and it's basically an open source community of developers 18 00:01:13,110 --> 00:01:15,030 asking and answering each other's questions. 19 00:01:15,030 --> 00:01:21,960 And so there are millions of questions and millions and millions of answers on all kinds of little things 20 00:01:22,350 --> 00:01:26,100 that people do in all programming languages, not just JavaScript. 21 00:01:26,340 --> 00:01:27,950 So let's take a look at these more in depth. 22 00:01:28,560 --> 00:01:32,400 So here is three schools on the intro to JavaScript. 23 00:01:33,270 --> 00:01:34,560 You can take a look and see. 24 00:01:34,800 --> 00:01:42,390 There is a whole menu where you can go into each different concept. 25 00:01:42,390 --> 00:01:50,430 In JavaScript, you can look at syntax, comments, variables, numbers, strings, dates for loops, 26 00:01:51,180 --> 00:01:53,700 hoisting scop, arrow functions. 27 00:01:54,150 --> 00:02:00,630 These are all things that we're going to discuss in our course and the differences between S5 and Ethics 28 00:02:00,630 --> 00:02:08,370 and JSON and then so much more about objects and functions and classes, asynchronous coding, DOM, 29 00:02:08,370 --> 00:02:10,500 antipollution, lots of different things. 30 00:02:10,740 --> 00:02:14,550 OK, so let's dig into just an example. 31 00:02:14,910 --> 00:02:21,810 One of the best things that I love about three schools and their JavaScript page is that they have a 32 00:02:21,810 --> 00:02:27,360 try it yourself example on just about every single page they can. 33 00:02:27,870 --> 00:02:34,260 You can click here and you can see how JavaScript is rendered in a browser window, how it is working 34 00:02:34,260 --> 00:02:37,860 in the middle of an HTML document. 35 00:02:38,520 --> 00:02:44,910 You can see if we run this it and you just click this button here, it changes the text from one thing 36 00:02:44,910 --> 00:02:45,390 to another. 37 00:02:46,470 --> 00:02:54,210 So on click, it's going to it's just executing the JavaScript right here in this button on click normally. 38 00:02:54,210 --> 00:03:00,420 Normally what you do is unclick would have a reference to a specific JavaScript file or a reference 39 00:03:00,420 --> 00:03:02,850 to a specific script element on the page. 40 00:03:03,390 --> 00:03:08,910 But this one just straight up puts the JavaScript right in there and it does document dot get element 41 00:03:08,910 --> 00:03:10,140 by ID demo. 42 00:03:10,650 --> 00:03:17,220 So it's looking in this HTML for the demo tag and it looks for this selector of ID equals demo. 43 00:03:18,060 --> 00:03:22,320 Once it finds that ID, it looks at the inner HTML. 44 00:03:22,320 --> 00:03:30,210 So that just means what's between the opening tag and the closing tag of this HTML element right here. 45 00:03:31,460 --> 00:03:38,720 And so once it finds that Internet e-mail, it changes it at reassigns the value to hello, JavaScript. 46 00:03:38,750 --> 00:03:41,670 So that's what you see when you run that right there. 47 00:03:41,690 --> 00:03:43,040 It'll change this. 48 00:03:43,290 --> 00:03:48,250 That's the default to the content that is specified right here. 49 00:03:48,710 --> 00:03:49,730 Hello, JavaScript. 50 00:03:50,840 --> 00:03:55,670 And you can see the way this works is there's a single quotes and then they use double quotes to keep 51 00:03:55,670 --> 00:03:56,840 things separated. 52 00:03:57,920 --> 00:04:04,130 OK, so that's an example of JavaScript running in a Web browser and you just do it directly inside 53 00:04:04,130 --> 00:04:09,470 this unclick attribute of this button element in HTML. 54 00:04:10,430 --> 00:04:12,500 Just writing the JavaScript directly in there. 55 00:04:12,910 --> 00:04:17,450 You could do an insanely long JavaScript file right here, just separated with semicolons if you wanted 56 00:04:17,450 --> 00:04:17,660 to. 57 00:04:18,960 --> 00:04:24,690 All right, so that's an example, and that's what makes three schools so helpful, is that you can 58 00:04:24,690 --> 00:04:31,170 look at these documentation pages for JavaScript, SQL, Python, lots of different languages, but 59 00:04:31,170 --> 00:04:34,630 it's very, very all inclusive for JavaScript. 60 00:04:34,740 --> 00:04:36,630 And as I said there, try it yourself. 61 00:04:36,630 --> 00:04:38,010 Links just about everywhere. 62 00:04:39,240 --> 00:04:40,440 You can try this yourself. 63 00:04:41,640 --> 00:04:43,650 And then we'll open up this test. 64 00:04:45,060 --> 00:04:46,680 Suite where you can. 65 00:04:47,750 --> 00:04:54,140 Download this, you can run it, you can change anything, so if I wanted to change this from ten over 66 00:04:54,140 --> 00:04:55,540 nine, try it. 67 00:04:55,550 --> 00:04:59,720 It's going to stay true if I change this to eight over nine and run it. 68 00:05:01,150 --> 00:05:04,480 It's going to say false because eight is not greater than nine. 69 00:05:04,840 --> 00:05:05,190 OK. 70 00:05:06,150 --> 00:05:07,050 So there you go. 71 00:05:07,350 --> 00:05:12,060 So this is there was a test of boolean logic boolean just means checking if something is true or false. 72 00:05:13,810 --> 00:05:15,780 OK, so there you go. 73 00:05:16,690 --> 00:05:22,990 That's three schools I highly recommend checking this resource out first, whenever you run into a simple 74 00:05:22,990 --> 00:05:29,530 question of what does a specific word do, what does a specific function do in JavaScript? 75 00:05:29,530 --> 00:05:35,140 So it will help you a lot with understanding variables and all the other data types that can be assigned 76 00:05:35,140 --> 00:05:39,880 to variables and different ways of manipulating information in JavaScript. 77 00:05:41,270 --> 00:05:45,020 OK, then we move on to Mozilla and the Mozilla Developer Network. 78 00:05:45,640 --> 00:05:48,810 This is just resources for developers by developers. 79 00:05:49,180 --> 00:05:54,850 It's also open source, but it's organized by the Mozilla Foundation. 80 00:05:55,960 --> 00:05:58,870 So if you go, you can look at web technologies. 81 00:06:00,540 --> 00:06:03,210 And you can look at Web references for JavaScript. 82 00:06:04,570 --> 00:06:12,970 And so on this page, you can reference all of these different things, look for builtin objects, expression's 83 00:06:12,970 --> 00:06:17,030 functions, classes, look at complete beginners. 84 00:06:17,050 --> 00:06:22,990 So I would definitely start with JavaScript basics and first steps and look at some of these things 85 00:06:22,990 --> 00:06:23,410 in here. 86 00:06:24,340 --> 00:06:29,020 You can look at guides and you can feel free to search if you want to search for something specific, 87 00:06:29,020 --> 00:06:34,050 like you could search for, let it. 88 00:06:35,910 --> 00:06:42,360 So in this the Web JavaScript reference statements, let the statement declares a block scoped local 89 00:06:42,360 --> 00:06:44,790 variable optionally initializing it to a value. 90 00:06:46,330 --> 00:06:50,980 And then they have an example in here, and just like in three schools, they have an example that you 91 00:06:50,980 --> 00:06:52,080 can test and run. 92 00:06:52,930 --> 00:06:56,100 Not every page has these examples, but many of them do. 93 00:06:56,110 --> 00:06:58,240 And then you can change these right in here. 94 00:06:59,260 --> 00:07:04,060 So I can change that one X plus two and run it again instead of one. 95 00:07:04,060 --> 00:07:04,750 I get three. 96 00:07:05,720 --> 00:07:08,880 So, yeah, it's perfect and you can reset it. 97 00:07:09,980 --> 00:07:17,030 So this is a fantastic resource and likewise has references for not just JavaScript but some other languages 98 00:07:17,030 --> 00:07:17,440 as well. 99 00:07:18,980 --> 00:07:24,170 OK, and then the final one I want to cover today is stack overflow. 100 00:07:25,670 --> 00:07:26,840 Zoom in a little bit on this. 101 00:07:28,060 --> 00:07:35,710 So Stack Overflow is is this great website where developers basically just ask each other questions 102 00:07:35,710 --> 00:07:37,300 and get answers. 103 00:07:37,720 --> 00:07:43,630 For the most part, the way people access questions on Stack Overflow is simply by Googling a question. 104 00:07:43,810 --> 00:07:47,290 And then Stack Overflow is typically one of the top few responses. 105 00:07:48,070 --> 00:07:55,480 But you could just put something in here like how to reverse a string in JavaScript. 106 00:07:58,380 --> 00:08:03,810 OK, and then you might need to comply with some robot query. 107 00:08:06,820 --> 00:08:12,700 And then there you go, trying to reverse a string, using a phrase not by classic method, but it doesn't 108 00:08:12,730 --> 00:08:18,790 work as expected, how to reverse the string recursively, how to reverse the string in JavaScript in 109 00:08:18,790 --> 00:08:19,430 a for loop. 110 00:08:19,810 --> 00:08:23,200 So there's all kinds of different examples and questions. 111 00:08:23,200 --> 00:08:26,610 You'll probably find something that's close to what you're looking for. 112 00:08:28,120 --> 00:08:36,910 And so basically, there are lots of different answers, typically, if you were to ask a question on 113 00:08:36,910 --> 00:08:38,640 here, you would get an answer fairly quickly. 114 00:08:39,430 --> 00:08:44,590 But before you ask any questions on Stack Overflow, definitely search for your answer and see if it's 115 00:08:44,590 --> 00:08:50,540 already been asked nine times out of ten, probably closer to ninety nine times out of one hundred. 116 00:08:50,920 --> 00:08:57,010 Your question has already been asked, so you'll be able to find multiple answers for it and you'll 117 00:08:57,010 --> 00:08:58,480 be able to get on your way very quickly. 118 00:08:59,530 --> 00:09:02,680 But all of these questions are in here because somebody asked them originally. 119 00:09:02,860 --> 00:09:05,140 So don't be afraid to ask if you don't see an answer. 120 00:09:06,010 --> 00:09:06,330 OK. 121 00:09:07,320 --> 00:09:09,150 So that is stack overflow. 122 00:09:09,930 --> 00:09:19,980 I highly recommend using it to find any kind of niche answers or more significant examples of fourth 123 00:09:19,980 --> 00:09:24,750 resource, which is kind of a bonus, is simply to put in GitHub and then your question. 124 00:09:25,890 --> 00:09:27,930 So you do GitHub or string. 125 00:09:30,070 --> 00:09:38,530 Then and we want to say jazz, then what it'll do is it will link you to specific git hub repos where 126 00:09:38,530 --> 00:09:42,730 people have tried to implement different things that might be related to your question. 127 00:09:43,910 --> 00:09:52,130 So we can go to this one and there's a string reverse in JavaScript and it just shows you somebody's 128 00:09:52,160 --> 00:09:59,420 actual project where they have made an attempt at something related to what you're asking about. 129 00:09:59,720 --> 00:10:04,520 So definitely using these four resources, w three schools. 130 00:10:06,500 --> 00:10:15,410 The Mozilla developer network stack overflow and GitHub itself, you should be able to find almost every 131 00:10:15,560 --> 00:10:21,170 answer that you're looking for while you're coding JavaScript from time to time, there's something 132 00:10:21,170 --> 00:10:22,110 you won't be able to find. 133 00:10:22,130 --> 00:10:27,670 And so it's I highly recommend getting in touch with a developer community. 134 00:10:28,070 --> 00:10:30,000 So that's what these are as well. 135 00:10:30,020 --> 00:10:36,380 But if you could get in touch with developers, find them, you know, people that have gone through 136 00:10:36,380 --> 00:10:40,370 coding schools, then you should be able to get a lot of help. 137 00:10:40,370 --> 00:10:43,370 Developers, for the most part, are very interested in helping one another. 138 00:10:43,620 --> 00:10:48,980 There's there's not a competition mentality that's that you see in a lot of other industries. 139 00:10:48,980 --> 00:10:49,820 Very much so. 140 00:10:50,060 --> 00:10:55,730 Everyone wants to help each other with these projects because the more code is built, the more things 141 00:10:55,730 --> 00:10:56,510 people can do. 142 00:10:56,810 --> 00:11:01,820 And it really benefits pretty much everyone to have open source projects that we can all contribute 143 00:11:01,820 --> 00:11:02,060 to. 144 00:11:02,360 --> 00:11:05,240 So that's it for this lesson. 145 00:11:05,540 --> 00:11:07,640 And let's go back to. 146 00:11:10,500 --> 00:11:16,500 The review, so that was online resources next are going to do a challenge where we're just going to 147 00:11:16,890 --> 00:11:20,320 do some actual JavaScript code and do a simple hello world. 148 00:11:20,880 --> 00:11:22,410 OK, we'll come back to that.