题解 | #简单密码#
单词倒排
http://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
var line=readline() var reg=/[^A-z]/g var arr=[] //先将特殊符号用空格替换 if(reg.test(line)){ line=line.replace(/[^A-z]/g,' ')
}
arr= line.split(' ') console.log(arr.reverse().join(' '))