16
Comments
  • 2
    slice and splice too, I never get them correct in first attempt.
  • 0
    *high pitched voice*
    Not if you’re using typescript 😏
  • 0
    @010001111 Even with TS, they all have the same signature (number, number) => string. You still need to check the built-in doc to make sure.
  • 0
    @localpost The build in types of typescript include the docs, duh

    And a good editor will show that on expand/hover, like vscode
  • 1
    @theabbie If it helps, I just remember it by thinking “p” is for put as in update to remember that splice modifies and slice copies.
  • 0
    @AmyShackles I just use slice if possible, it helps to remember though, thanks
Add Comment