isOnlyWhitespace function

JS task isOnlyWhitespace completed/commented.