Skip to content

Instantly share code, notes, and snippets.

View Crystal-RainSlide's full-sized avatar

RainSlide Crystal-RainSlide

View GitHub Profile
@Crystal-RainSlide
Crystal-RainSlide / slice.substring.substr.testcase.js
Last active May 22, 2022 02:51
String.prototype: slice() , substring() and substr() testcase
const str = "part1part2part3";
const argList = [
[], [0], [5], [-5],
[0, 0], [5, 5], [-5, -5],
[0, 5], [5, 7], [0, -5], [5, -5],
[5, 0], [7, 5], [-5, 0], [-5, 5],
["Boom"]
];