[TIL] Algorithms from programmers

SooΒ·2022λ…„ 11μ›” 21일
0

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

0개의 λŒ“κΈ€