This course has already ended.

JS3: Attendance and activity

FP

  1. map(), filter(), and reduce() are so called higher-order functions? What does it mean?

  2. Functions are the first-class citizens. What does this mean - give an example

  3. Functions can be declarations or expressions. Please explain the following snippet:

    const numbers = [1, 2, 3, 4];
    const addFive = (numbers) => [...numbers, 5]
    addFive(numbers);
    

Async: Promise

  1. What is the purpose of the two parameters in the Promise constructor’s callback argument?

    const promise1 = new Promise((resolve, reject) => {
      resolve('Success!');
    });
    
  2. How do you get the return value of a resolved Promise?

  3. What do we mean by “happy path” in the context of a promise chain?

  4. How would you get access to the rejected value ‘Fail!’? There are multiple alternatives - itemize

    const promise2 = new Promise((resolve, reject) => {
      reject('Fail!');
    });
    
  5. Can the Promise chain be continued after catch()? Give a rationale

Async: Fetch

  1. fetch() is AJAX enabler. What is AJAX - why do we need it?

  2. What is a query string? What is the separator between key-value pairs?

  3. What HTTP method benefits from query string? What are the other HTTP methods?

  4. Why does fetch() return a Promise? What does async keyword signify?

  5. What implications are there if you await fetch() to finish?

Co-authors

  1. Here, the sociogram is constructed as SVG. What is SVG?

  2. What is XML? Why AJAX is called Asynchronous JavaScript and XML?

  3. What is JSON? What is the relation between object literal notation and JSON?

  4. What is the structure of HTTP response? Where is JSON put?

  5. Header-wise, what is the difference between sending HTML or JSON content?

  6. Why would you select XML? Why JSON?

A+ presents the exercise submission form here.

Posting submission...