Month: May 2024
-
setInterval()
setInterval is a JavaScript command which takes two parameters. The first is the name of a function and the second is the time interval, in milliseconds, that this function should be repeatedly called. For example: In this code, setInterval calls the function ‘update’ every 10 milliseconds. The function increases the variable i by 1 and…
-
Using a textbox in HTML
—
A textbox in HTML looks like this: The code for this looks like: When the enter key is pressed, the getInput() function will be run. In order to use the data entered into the textbox, you look at the value property like this:
-
Arrays
An array in JavaScript is a variable containing multiple values. Arrays are indexed from 0 to n-1. By using a for loop, you can iterate through the array’s values without needing to list each value individually. Proper formatting makes an array’s structure easier to understand. Arrays are fundamental in JavaScript programming.
-

Jupiter’s tilt
The APOD video The NASA website, Astronomy Picture of the Day, has been posting an astronomy-related picture every day since 1995. The APOD post for April 21, 2024 was actually a video, which showed Jupiter as it was being passed by the Juno space probe. What I noticed At the end of the video, I…