Web Programming



  1. Implement a JavaScript module service that provides the following functions: The functions return a promise that resolves to a quote or a text, or rejects with an error.
  2. Write an HTML page that embeds a JavaScript module main that tries to get three translated quotes as follows:
    • While the quotes are fetched and translated, a waiting message is displayed.
    • After (and only after) all three quotes are successfully obtained, they are displayed on the page.
    • If an error occurs, an error message is displayed.
  3. (Optional) In any case three quotes should be displayed, even if an error occurs.