[TIL] Algorithms from programmers

SooΒ·2022λ…„ 11μ›” 21일
0
post-custom-banner

I started to solve the algorithm problems from last week. I used and learned this method today.

slice()

  • Syntax
arr.slice([begin[, end]])
  • Parameter

Here is a quick example:

[example] arr.slice(1, 3);

[example] arr.slice(-3, -1);

slice(): example

  • Return Value

A new array containing the selected elements.

profile
Soogineer's Devlog
post-custom-banner

0개의 λŒ“κΈ€