Building a Tiny JS World
December 8, 2020 · View on GitHub
Building a Tiny JS World
Assignment
- 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
Objectmethods likekeys,values,entriesshouldn'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 employingArray.forEachas the least`${obj.prop1}; ${obj.prop2}; ${obj.prop3};`(yes, strings/template literals are a form of code) must be refactored employing appropriateArraymethods (you will findmapandjointo be the most handy)
Code review and assignment finalization
When complete do the following:
- 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.jsonly) to thefrontend-2021-homeworksorfrontend-2019-p2prepo for code review.
- Great job! Go ahead and share your progress with others –
post a message in course channel:
A Tiny JS World — #done(orA Tiny JS World — #p2p_doneif you are p2p course student) and add the link to your repo. This step is important, as it helps mentors to track your progress! - 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