题解 | #字符串最后一个单词的长度#
字符串最后一个单词的长度
http://www.nowcoder.com/practice/8c949ea5f36f422594b306a2300315da
const readline = require('readline') var rl = readline.createInterface({ input:process.stdin, output:process.stdout }) rl.on('line',(line)=>{ var arr = line.split(' ') console.log(arr[arr.length - 1].length) // var newLine = line.substring(line.indexOf(' ')+1) })