1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

LibJS: Implement console.assert()

This commit is contained in:
Linus Groh 2021-04-18 17:08:14 +02:00
parent e37421bddc
commit 8d490aba76
12 changed files with 89 additions and 9 deletions

View file

@ -321,10 +321,10 @@ void VM::throw_exception(Exception& exception)
unwind(ScopeType::Try);
}
String VM::join_arguments() const
String VM::join_arguments(size_t start_index) const
{
StringBuilder joined_arguments;
for (size_t i = 0; i < argument_count(); ++i) {
for (size_t i = start_index; i < argument_count(); ++i) {
joined_arguments.append(argument(i).to_string_without_side_effects().characters());
if (i != argument_count() - 1)
joined_arguments.append(' ');