mirror of
https://github.com/flynx/Course-JavaScript.git
synced 2025-10-28 18:40:08 +00:00
notes....
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0d1ed3b7ac
commit
2d4fda73b4
@ -361,7 +361,10 @@
|
||||
function List(){
|
||||
var obj = this instanceof List ?
|
||||
this
|
||||
// create an array base object but link it to List...
|
||||
// create an array base object but link it to List as prototype...
|
||||
// NOTE: if List is not linked to Array the instances will
|
||||
// not have access to any of the array methods but will
|
||||
// support the indexing syntax.
|
||||
: Reflect.construct(Array, arguments, List)
|
||||
return obj
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user