An open API service indexing awesome lists of open source software.

https://github.com/dracula27/objects-practice

Per Scholas - Week2 - JS&CSS Concepts - Assignment: Party Array
https://github.com/dracula27/objects-practice

git github javascript

Last synced: about 2 months ago
JSON representation

Per Scholas - Week2 - JS&CSS Concepts - Assignment: Party Array

Awesome Lists containing this project

README

          

# objects-practice

Per Scholas - Week2 - JS&CSS Concepts - Assignment: Party Array

Below are the prompts I followed to write some JavaScript code to manipulate an array of objects for a party of adventurers.



  • Prompt 1: double the hitpoints of everyone in the party.

  • Prompt 2: Timothy has been hit with an arrow, subtract 5 points from his hp.

  • Prompt 3: Sarah's tiger has been turned into a jellyfish by a wizard, please change it.

  • Prompt 4: Timothy drank this potion. Raise his hitpoints by 20 and remove "potion" from his belongings.

  • Prompt 5: Timothy got hungry and stole Joline's bread. Take it out of her belongings and put it into Timothy's belongings.

  • Prompt 6: Joline got upset and left the party. Take her out of the array. (leaving member is parameter).

  • Prompt 7: Timothy and Sarah have been recruiting. Add a new adventurer to the party. (new adventurer is parameter).

  • Prompt 8: The party has been doing well! They found 200 gold. Create a new property called gold and split the gold evenly between everyone. (amount of gold is parameter).

  • Prompt 9: Sarah is tired of taking care of a jellyfish. Subtract some gold from her and change her companion to a bear.

  • Prompt 10: Timothy’s sword has gotten old. Change it to “Rusty Sword".

  • Prompt 11: Write a function called setLeader that takes a name as a parameter. The member with that name should have a new property leader: true while the other members have leader: false.