COMP 2015 – Assignment
Due at the beginning of Lesson 6 to the Dropbox > ‘Assignment’ folder on D2L (learn.bcit.ca) Access to the dropbox folder for Assignment will close at the beginning of Lesson 6, so make sure to have your assignment submitted before class starts.
Submission
Write one .js file named firstname-lastname-assignment.js and submit that file to the
Assignment dropbox on D2L. For example, if your name is Chris Harris, your file must be called
chris-harris-assignment.js
Only submit your .js file, do not include any HTML or images.
Instructions
Use the provided HTML to test your script Part 1
a. Create an empty array called 'images' - it will later contain strings that are urls to images, i.e. http://somesite.com/slide0.jpg
b. Use the fetch() function to retrieve an array of json objects from http:// comp2015.herokuapp.com/images and pass it to a named function (name this function whatever you like)
c. Inside your named function, loop through the array of json objects (accessing the appropriate object properties) and push the image urls into your images array
d. Once you have verified that your image array contains the correct data, proceed to part 2
Get Free Quote!
447 Experts Online