Week 7 Labs: JavaScript - Callbacks, arrow functions, promises & apis
-
JS Practice: JavaScript objects & arrays
-
First arrays
: accessing, reading, adding, removing, modifying, sorting,
reversing & looping over array elements
-
First objects
: JSON - reading, changing and adding data
-
Nested objects
: reading nested objects
-
Looping
: arrays & objects
-
JavaScript classes
-
Callback functions & Arrow notations (=>):
-
Animals
: forEach() looping with a classic
callback function & callback function using
=>.
-
Button
: button with an addEventListener() for a
click event with a callback function
-
setTimeout(handler/fn, ms): a method that
calls a function or evaluates an expression after a specified number
of milliseconds.
-
setInterval(handler/fn, ms): a method that
calls a function or evaluates an expression at specified intervals.
It will continue calling the function until
clearInterval() is called, or the window
is closed.
-
Draw text on a picture
: drawing an image on a canvas with text writing input features.
Demonstrates the load event listener with
a callback function.
-
fetch() and promises
-
Promises
: Introduction
-
YouTube projects:
1.1: fetch() - Working With Data & APIs in JavaScript
by The Coding Train
Needs a live server for demonstration
-
Fetching images:
-
V1
: locally fetching an image using a server with
.then
-
V2
: locally fetching an image using a server with
async and
await instead of
.then
-
V3
: locally fetching multiple images using a server with
async and
await instead of
.then
-
Fetching text
: locally fetching a text file using a server with
async and
await instead of
.then
-
Fetching text from csv file
: locally fetching a csv file using a server with
async and
await instead of
.then. Displaying the data into a line
chart using ChartJS library.
-
API (Application Programming Interface)
-
ExpressJS
-
Also see,
Lab 7 assignment repository
ITEC 2560-60: Web Client and Server Programming
Minneapolis Community and Technical College (MCTC), Minneapolis,
Minnesota
Prof. Clara James, Fall 2020
August 25, 2020 to December 15, 2020 (Tuesdays)