Created
May 12, 2018 14:55
-
-
Save khg0712/1f85882866bd10697e8ee90158ab8e2b to your computer and use it in GitHub Desktop.
splice 메서드 사용방법
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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