Built-in Methods

Learning Competencies

  • Research and use built-in JavaScript methods
  • Use the built-in Array methods:
    • Map
    • Filter
    • Find
    • Join
  • Use the built-in String methods:
    • Split
    • ToUpperCase

Time Box

ActivityTime
Kata4 hours
Reflect10 minutes

Summary

In this challenge, you will be using some of the built-in methods for arrays and strings. A built-in method is another name for a function already written for you and available in the basic JavaScript library. You just need to know how to use it!

Each function waiting to be written focuses on a different array method. You need to research the methods you will use for each of these functions to make the tests pass.

The MDN documentation can be a great place to start, as it lists all the built-in methods available for both arrays and strings, but you will want to find your own resources about these methods to help you complete your functions.

Get Coding

You will need to use built-in array and string functions to get the tests passing. The tests will give you some feedback on what they expected to have received from your function and what they actually received to help you complete the code and pass the tests.

These are the functions you will need to complete:

concatMyArray

This function takes an array of individual strings and then will need to join them together to return one string.

capitalize

This function takes a sentence. It needs to map over every word in that sentence and Capitalize The First Letter Of Every Word.

whereAreYou

This function takes an array of objects. Use the find method and return the first object that “Scooby” is hiding within. Look at the tests in the whereAreYou.test.js file or use console.log inside of the function to determine the structure of objects in the array.

deBee

This function takes a string. You will need to split the string into individual words before you filter out all those annoying buzzing sounds! It might be helpful to look at the tests in the deBee.test.js file or use console.log inside of the function.

Reflection

Navigate to your my-reflections-sprint-4 file and answer the question under the heading Kata.

Commit and push your changes to GitHub.