Skip to content

Instantly share code, notes, and snippets.

@rococodogs
Created April 30, 2015 20:35
Show Gist options
  • Select an option

  • Save rococodogs/461bd84e92408d6a15fc to your computer and use it in GitHub Desktop.

Select an option

Save rococodogs/461bd84e92408d6a15fc to your computer and use it in GitHub Desktop.
the coolest logging for today's rad-est teens
// > console.teen("omg so kewl!")
// OmG sO kEwL!
console.teen = function() {
var input = [].slice.call(arguments).join(' '), yay = true, i = 0, out = '', l
if (!input.length) return;
for(;i<input.length;i++) {
l = input[i]
if (/[a-z]/i.test(l)) {
out += yay ? l.toUpperCase() : l
yay = !yay
} else {
out += l
}
}
console.log(out)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment