Sign in
webkit
/
WebKit
/
36234e633907e0345e06a39a886b5b9fff0ba3fe
/
.
/
JSTests
/
es6
/
Array_static_methods_Array.from_map_function_array-like_objects.js
blob: 1db30571108d690aa127c30e5ca3ce1455e157d3 [
file
] [
log
] [
blame
]
function
test
()
{
return
Array
.
from
({
0
:
"foo"
,
1
:
"bar"
,
length
:
2
},
function
(
e
,
i
)
{
return
e
+
this
.
baz
+
i
;
},
{
baz
:
"d"
})
+
''
===
"food0,bard1"
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);