1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 18:35:07 +00:00

LibJS: Remove unnecessary space character at the end of console.log()

This commit is contained in:
Andreas Kling 2020-03-25 14:08:47 +01:00
parent 05311782d7
commit a94a150df0

View file

@ -34,9 +34,12 @@ namespace JS {
ConsoleObject::ConsoleObject()
{
put_native_function("log", [](Object*, const Vector<Value>& arguments) -> Value {
for (auto& argument : arguments)
printf("%s ", argument.to_string().characters());
printf("\n");
for (size_t i = 0; i < arguments.size(); ++i) {
printf("%s", arguments[i].to_string().characters());
if (i != arguments.size() - 1)
putchar(' ');
}
putchar('\n');
return js_undefined();
});
}