Skip to content

Instantly share code, notes, and snippets.

@rlemon

rlemon/dugger.js Secret

Created January 10, 2018 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlemon/aa5fcbf304acddec1a24dd35fece73ed to your computer and use it in GitHub Desktop.
Save rlemon/aa5fcbf304acddec1a24dd35fece73ed to your computer and use it in GitHub Desktop.
const button = $('<button class="button">ndDuGgER</button>');
button.on('click', () => {
input.value = input.value.split('')
.map((letter, index) =>
index % Math.floor(Math.random()*2+2) ? letter.toLowerCase() : letter.toUpperCase()
).join('');
}).appendTo('#chat-buttons');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment