Have you ever been in the node repl and typing away and wish that you could just save what you just did to a file?

Today I learned you can! While in the repl, do the following:

.save myawesomefile.js


then exit out of the REPL and there you go!

That is one cool thing, and I also learned one more today. When in the REPL you can open a multi line editor with this command:

.editor


it will let you do multiple lines of code including editing the previous line. Use ctrl-d to evaluate the code and return you to the REPL prompt.