Heads up! This blog post hasn't been updated in over 2 years. CodePen is an ever changing place, so if this post references features, you're probably better off checking the docs. Get in touch with support if you have further questions.

This is a supported command now in the console.

console.clear();

Much like the native browser console, it only clears when the entire page refreshes. Refreshing just the demo doesn't clear the console. If you want a clear console every time the demo refreshes, put that line at the top of the JS and it'll do the job:

You can also type clear() from the console itself to clear it manually (or use the little button!)