neighbor === neighbor.toLowerCase() evaluates to true for separators ('' and space), so an uppercase letter following`''or' 'will getCAMEL_BONUSas well asSEPARATOR_BONUS. This is different from the C++ version where::islower(neighbor)` is false for non-alphabetic characters.
neighbor === neighbor.toLowerCase()
evaluates to true for separators ('' and space), so an uppercase letter following`''or
' 'will get
CAMEL_BONUSas well as
SEPARATOR_BONUS. This is different from the C++ version where
::islower(neighbor)` is false for non-alphabetic characters.