1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 16:05:06 +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() 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();
}); });
} }