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
- Host: GitHub
- URL: https://github.com/dracula27/objects-practice
- Owner: DrAcula27
- Created: 2022-11-22T22:18:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-23T17:18:56.000Z (over 3 years ago)
- Last Synced: 2025-08-12T02:40:52.199Z (11 months ago)
- Topics: git, github, javascript
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.