Skip to content

Instantly share code, notes, and snippets.

@martypdx
Created June 2, 2015 04:07
Show Gist options
  • Save martypdx/e663ee30f02ede548f75 to your computer and use it in GitHub Desktop.
Save martypdx/e663ee30f02ede548f75 to your computer and use it in GitHub Desktop.
<textarea id='input'>this is my sentence</textarea>
<script>
// letter count
// word count
var textarea = document.getElementById('input');
var sentence = textarea.value;
var length = sentence.length;
for( var i = 0; i < length; i++ ) {
var everything = 0;
console.log(sentence[i]);
everything = everything + 1;
}
console.log(everything)
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment