Method Chaining

  • Commonly in code, you'll see functions / methods "chained" together
  • This means calling a method on the result of another method
  • Remember that methods are like functions that act on a particular piece of data
const myName = "Ryan";
    console.log(
        myName.repeat(3)
            .toUpperCase()
            .substring(0,6)
    )

22 / 25