mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 21:05:07 +00:00
LibJS: Remove unnecessary space character at the end of console.log()
This commit is contained in:
parent
05311782d7
commit
a94a150df0
1 changed files with 6 additions and 3 deletions
|
@ -34,9 +34,12 @@ namespace JS {
|
||||||
ConsoleObject::ConsoleObject()
|
ConsoleObject::ConsoleObject()
|
||||||
{
|
{
|
||||||
put_native_function("log", [](Object*, const Vector<Value>& arguments) -> Value {
|
put_native_function("log", [](Object*, const Vector<Value>& arguments) -> Value {
|
||||||
for (auto& argument : arguments)
|
for (size_t i = 0; i < arguments.size(); ++i) {
|
||||||
printf("%s ", argument.to_string().characters());
|
printf("%s", arguments[i].to_string().characters());
|
||||||
printf("\n");
|
if (i != arguments.size() - 1)
|
||||||
|
putchar(' ');
|
||||||
|
}
|
||||||
|
putchar('\n');
|
||||||
return js_undefined();
|
return js_undefined();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue