From the course: JavaScript Code Challenges: Creating Web Apps
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Overview of the necessary JavaScript concepts - JavaScript Tutorial
From the course: JavaScript Code Challenges: Creating Web Apps
Overview of the necessary JavaScript concepts
- [Instructor] Before we start coding, let's go over the JavaScript concepts you'll need for this project. Nothing too fancy. We're keeping it beginner friendly. Here's what you'll see in action. First up, DOM Access. DOM stands for Document Object Model. We use document.getElementByID to grab our HTML elements like the timer and the buttons. This is how we connect our JavaScript to the actual page. Like this. Here we have a button that says click me, and then we're going to say in our JavaScript constant button, so that's where we're going to store it in equals document.getElementByID my button that's equal to the ID, and then we can go ahead and do things with it. In this case, we're logging the text content, which is equal to click me because that's the inner text of the button. The next thing we need to write are our functions. We use functions to organize behavior such as starting, pausing, resetting the timer and updating the display. Here's an example of a basic function. So in…
Contents
-
-
-
(Locked)
Introduction: Pomodoro timer1m 55s
-
(Locked)
Planning the features1m
-
(Locked)
Creating the UI3m 37s
-
(Locked)
Overview of the necessary JavaScript concepts4m 31s
-
(Locked)
Static timer6m 29s
-
(Locked)
Start, pause, reset3m 58s
-
(Locked)
Work/break cycle2m 59s
-
(Locked)
Final touches2m 56s
-
(Locked)
Challenge: Tracking cycles1m
-
(Locked)
Solution: Tracking cycles1m 28s
-
(Locked)
-
-
-
-
-