Skip to content

homework

Miguel Gamboa edited this page Dec 9, 2021 · 9 revisions

Share your code with user fmcarvalho in a private Github repository named iselpi2122-your_number.

Homework 01

  • Install node.js version LTS (long-term support)

Homework 02

Complete the 3 exercises at the end of Chapter 2 - Program Structure:

  1. Looping Triangle
  2. FizzBuzz
  3. Chessboard

Homework 03

Complete the 3 exercises at the end of Chapter 3 - Functions:

  1. Minimum
  2. Recursion
  3. Bean counting

Homework 04

Implement function inspect(obj):

  • Prints on console pairs of properties names and values (name = value; ...) of given obj.
  • Whenever a property is a method (function), then it prints the result of that method call.
    • Consider only parameterless methods and ignore further methods.

Homework 05

Complete the 2 exercises at the end of Chapter 4 - Data Structures: Objects and Arrays:

  1. A list
  2. Deep Comparison

Homework 06

Implement the 3 exercises at the end of Chapter 5 - Higher-order functions:

  1. Flattening
  2. Your own loop
  3. Everything

Homework 07

Implement the function tracksOfTopArtist(country) that returns the tracks for the first artist in the top artists of the given country.

This function should reuse the functions getTopArtists(country) and getTopTracks(artist).

Homework 08

Using the function getBodySize(url) implement another function sumBodiesSizes(...urls) that returns the sum of the response bodies' lengths for given urls.

DO NOT use either Promise.all() or new Promise((...))

Homework 09

Add to tasks-db.js module an updateTask(username, id, due, title, description) that updates the task with ìd of user username with new data. Also, implement the corresponding unit test.

Homework 10

Add to the web app of lesson28-tasky-ui-template-engine a route for /users/:username/tasks that renders a view with a table containing the tasks for that username.

Link each user presented in /users with corresponding /users/:username/tasks.

Add the bootstrap class table to that table to enhance its look and feel.

Clone this wiki locally