Skip to content

Why use [].slice.call() #31152

Discussion options

You must be logged in to vote

Array.prototype.slice.call is one way to convert the NodeList into a real array so that you can use the methods from Array.prototype. NodeList acts like an array, but doesn’t have the methods from Array.prototype.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@ZhangChengLin
Comment options

@rohit2sharma95
Comment options

@ZhangChengLin
Comment options

@ZhangChengLin
Comment options

Answer selected by ZhangChengLin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants