Code

General Code

Timers

Timers are used in JavaScript for things like animation, firing functions, etc. They run asynchronously so you don’t have to wait on them. Here is an example… The setTimeout function fires code when we tell it to based upon the time we give it. In the above example, we are running a function that outputs […]

Timers Read More »

Window Object

The window object is the global object in JavaScript. We can access this object from anywhere in JavaScript. You have used the window object without realizing it. For example, console is a window property. There are several properties and methods on the window object. I recommend looking at the Mozilla developer network… https://developer.mozilla.org/en-US/docs/Web/API/Window Happy Coding!

Window Object Read More »

Importing a Module

To use a module that has the “export” keyword, we have to import it into our code. To do this we use the “import” keyword… This is placed at the top of the file and makes all of the items that have been exported from the animal.js file available. Notice the from part of the

Importing a Module Read More »