javascript - Incrementing letters in string - treating char as int without using .charCodeAt(0) -
here assignment:
replace every letter in string letter following in alphabet (ie. c becomes d, z becomes a).
now i've done type of thing in c lessons using fancy modulo 26 business , lot of subtraction , offsetting of ascii values.
is going take more lines in javascript (since instead of treating char int have use fromcharcode
, charcodeat
), or javascript have shortcuts task?
Comments
Post a Comment