First off, I know this is far from professional. I\'m trying to learn how to work with strings. What this app is supposed to do is take a simple text input and do a few thi
You can use match() and regular expressions.
var str = "aBcD"; var numUpper = (str.match(/[A-Z]/g) || []).length; // 2