In this Coding Challenge, I build a word counting (concordance) web application in JavaScript. The video demonstrates a use of associate arrays, regular expressions, and other techniques previously covered as part of “Programming from A to Z.”
Next Video: https://youtu.be/fxQ0B6BkfKo
http://shiffman.net/a2z/text-analysis/
Course url: http://shiffman.net/a2z/
Support this channel on Patreon: https://patreon.com/codingtrain
Send me your questions and coding challenges!: https://github.com/CodingTrain/Rainbow-Topics
Contact: https://twitter.com/shiffman
GitHub Repo with all the info for Programming from A to Z: https://github.com/shiffman/A2Z-F16
Links discussed in this video:
ITP from Tisch School of the Arts: https://tisch.nyu.edu/itp
Source Code for the all Video Lessons: https://github.com/CodingTrain/Rainbow-Code
p5.js: https://p5js.org/
Processing: https://processing.org
For More Programming from A to Z videos: https://www.youtube.com/user/shiffman/playlists?shelf_id=11&view=50&sort=dd
For More Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
Help us caption & translate this video!
http://amara.org/v/XJ8r/
Original source
24 responses to “Coding Challenge #40.1: Word Counter in JavaScript”
Genius
How did he get that console????
hi. i just want to make spelling bee aplication in javascript, but i don't know how to make the code. can you tell me how to make it ? thnks
Awesome video! Love your enthusiasm and clear explanations. Thanks so much for putting this up.
Great one. Thanks ๐
I have a noob question. On the if statement, how does incrementing an 'object "key" equals the increase in count in "value" ? I understand the declaration of value to 1, if the word (aka counts[word] ) is undefined. But if it exists why does counts[word]++ define the value of the key?
He should've counted the word frequencies of the Bee movie script instead… ๐
I've always loved and hated learning string patterns. They're extremely useful to use and make you look super smart but they're terribly hard to learn.
awesome content.i needed this.
Wait, why do we always use p5.js? Why not just javascript? Is using just javascript too advanced?
you are best coder in my opinion!
Word counter with graph :- http://codingflag.in/mysketch.php?sketch=95
You have a HUGE!!!! problem. What if, by accident, you have a word that is part of the prototype? That should break some stuff. What you can do is to append a NULL-char at the beginning. That is, instead of `counts[key]`, you use `counts['