Use regular expressions:
var hasDuplicates = (/([a-z])\1/i).test(str)
Or if you don't want to catch aA
and the likes
var hasDuplicates = (/([a-zA-Z])\1/).test(str)
Or, if you've decided you want to clarify your question:
var hasDuplicates = (/^([a-zA-Z])\1+$/).test(str)