This is for people to post tips for making ASCII art, game design or just handy tips.
My tips:
\n to make a new line
console.log("text"); to output
console.clear(); to clear the console
console.table(array_name); to output an array of objects in an orderly fashion
use document.addEventListener() to listen for key presses and other events:
"mousedown"(detect when mouse is down), "mouseup"(opposite of mousedown), "keydown"(when a key is held down), "keyup" (the opposite of keyup)
you can use console.group to make an inventory, like so:
var inventory = ["cat", "dog", "dog"];
console.group("inventory");
for(var i = 0; i < inventory.length; i++) {
console.log(inventory[i]);
}
console.groupEnd();
make sure to put a console.groupEnd(); after it, or else anything you type will become part of the inventory group.