06. Manipulative methods πŸ‘©β€πŸŽ“πŸ‘¨β€πŸŽ“

πŸ“– Implement Array and String Manipulative Methods

Work with a partner to implement the following user stories:

  • As a developer, I want to use array methods to add and remove elements from an array and join two arrays.

  • As a developer, I want to use a string method to return a new string that contains only capital letters.

Acceptance Criteria

  • It’s done when the string "Canis Major" is added as the first element of the constellations array and no elements are removed.

  • It’s done when "Venus" is removed from the planets array.

  • It’s done when the arrays constellations and planets are joined to form a new array named galaxy. The arrays constellations and planets should not be altered.

  • It’s done when the string "polaris" is converted into all capital letters and the new string is stored in a variable.

πŸ“ Notes

Refer to the documentation:

MDN Web Docs on array instance methods

MDN Web Docs on string instance methods

πŸ† Bonus

If you have completed this activity, work through the following challenge with your partner to further your knowledge:

  • What happens when you use typeof on an array? What is returned? Is that what you expected? Why or why not?

Use Google or another search engine to research this.


βœ… Solutions

Solutions Click Here