defined 2nd method

return if characters is less than 0, we use javascript math object abs
method. abs returns absolute value. So if the character value is
negative, it will return a positive