Building a Tiny JS World

December 8, 2020 · View on GitHub

MIT Licensed Awesome        Telegram

Building a Tiny JS World

Assignment

  1. Build a tiny JS world model following the instructions here.

At this stage you are required to complete only First approach part. You will revert to your Tiny JS World to improve it later. So, for now restrict yourself to the means you feel confident with.

Additional requirements

  • An object's properties that are parts of the object presentation string must be explicitly listed/specified
  • Object methods like keys, values, entries shouldn't be used to build an object's presentation string as these do not guarantee any particular order of keys/values
  • Your code is DRY, which means that whenever you see a pattern in your code it should be eliminated as much as possible. Examples:
    • print(dog); print(cat); etc ... should be refactored employing Array.forEach as the least
    • `${obj.prop1}; ${obj.prop2}; ${obj.prop3};` (yes, strings/template literals are a form of code) must be refactored employing appropriate Array methods (you will find map and join to be the most handy)

Code review and assignment finalization

When complete do the following:

  1. You will require code review for this task:
    • For Frontend 2021 course students: please, follow these instructions
    • For p2p course students: please, follow these instructions
    • Note, that especially this task requires you to submit a single file (index.js only) to the frontend-2021-homeworks or frontend-2019-p2p repo for code review.
  2. Great job! Go ahead and share your progress with others – post a message in course channel: A Tiny JS World — #done (or A Tiny JS World — #p2p_done if you are p2p course student) and add the link to your repo. This step is important, as it helps mentors to track your progress!
  3. Read one or two articles on OOP under the links in this repo

When you finish this task you can proceed to the next one.

Done?

➡️ Go forward to Object-Oriented JavaScript

⤴️ Back to Contents