Two versions of an **{{Array.make}}** method that handles list-like data structures such as **{{[HTMLCollection]}}**s / **{{[NodeList]}}**s, **{{[String]}}**s or **{{[arguments]}}** -arrays turning them into native array objects.
1
Two versions of an **{{Array.make}}** method that handles list-like data structures such as **{{[HTMLCollection]}}**{{s}} / **{{[NodeList]}}**{{s}}, **{{[String]}}**{{s}} or **{{[arguments]}}** -arrays turning them into native array objects.
2
2
3
3
This firstly implemented version creates an {{Array.make}} that will throw a **{{[TypeError]}}** if it got passed invalid arguments whereas the latter in that case will fail silently.
4
4
5
5
Tags added:
Tags removed:
public snippets
This is a community-maintained collection of reusable code snippets. Contribute something without logging in, or improve existing contributions. All code is dedicated to the public domain unless otherwise specified.