Skip to content

Instantly share code, notes, and snippets.

@khg0712
Created May 12, 2018 14:55
Show Gist options
  • Save khg0712/1f85882866bd10697e8ee90158ab8e2b to your computer and use it in GitHub Desktop.
Save khg0712/1f85882866bd10697e8ee90158ab8e2b to your computer and use it in GitHub Desktop.
splice 메서드 사용방법
var a = [1,2,3,4,5];
a.splice(1,2);
console.log(a);//[1,4,5] 출력
a.splice(3,0,'a','was',[1,4,5]);
console.log(a);//[1, 4, 5, "a", "was", Array(3)] 출력
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment