From the course: Getting Started as a Full-Stack Web Developer
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
JavaScript, a browser-native programming language
From the course: Getting Started as a Full-Stack Web Developer
JavaScript, a browser-native programming language
- [Instructor] JavaScript is the third leg of the stool that holds up the web. Like HTML and CSS, it's interpreted by the visitor's browser which makes it universal and easy to implement. This is what a short JavaScript program looks like. These green lines at the top are comments as are all the other lines that start with two slashes. Comments generally don't affect how a program works. They're there to help people who work on the program later. Then we start off the functional code by declaring variables. This is like in math class, when you said X equals five, but instead of X, we have things like today, todayDate, and so on. Then X or today in this case, takes on the value of whatever's on the right of the equal sign. After declaring some more variables, we come to a bunch of comparisons. If this is true, then do that. In this case, the code looks at the variables todayDate, todayMonth and so on. If any of them is…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.