Special Characters section


#1

Having trouble with the special character part. in the directions it states to create an array with special characters; however I've seen on other forums people placed the special characters in a string. Which is better a string or an array?
Here is my code:

function hasSpecialCharacter(input) {
  var specialCharacters = '!@#$%^&*+=';
  for(var i = 0; i < input.length; i++) {
    for(var j = 0; j < input.length; j++) {
      if(input[i]=== specialCharacters[j]) {
        
      }
    }
  }
}

#2

Both strings and arrays are iterable, and since all we are doing is look-up, either type is appropriate.