mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-16 06:30:41 +00:00
LibJS: Add spec comment to length_of_array_like()
This commit is contained in:
parent
e4b388ea5a
commit
d51ab20aaa
|
@ -88,8 +88,8 @@ ThrowCompletionOr<Object*> construct_impl(VM& vm, FunctionObject& function, Opti
|
|||
// 7.3.19 LengthOfArrayLike ( obj ), https://tc39.es/ecma262/#sec-lengthofarraylike
|
||||
ThrowCompletionOr<size_t> length_of_array_like(VM& vm, Object const& object)
|
||||
{
|
||||
auto result = TRY(object.get(vm.names.length));
|
||||
return result.to_length(vm);
|
||||
// 1. Return ℝ(? ToLength(? Get(obj, "length"))).
|
||||
return TRY(object.get(vm.names.length)).to_length(vm);
|
||||
}
|
||||
|
||||
// 7.3.20 CreateListFromArrayLike ( obj [ , elementTypes ] ), https://tc39.es/ecma262/#sec-createlistfromarraylike
|
||||
|
|
Loading…
Reference in a new issue