Using Chrome 38, typing console.log("test") directly in the console does the same.
The reason for that is that the console prints the value that is returned by the last statement.
console.log(...) returns undefined (well, returns nothing, void, for that matter), so you get undefined.
If the last statement returns something else (or has a value), that would be displayed.
console.log("test"); // Prints test.
"test"; // Prints test as well.
var test = "test";
console.log("test"); // Prints test.
test; // Prints test as well.
Note that this only happens in the console, not in JavaScript run as part of a page.