题解 | 字符串最后一个单词的长度
const rl = require("readline").createInterface({ input: process.stdin }); var iter = rl[Symbol.asyncIterator](); const readline = async () => (await iter.next()).value; void async function () { // Write your code here while(line = await readline()){ let words = line.split(' ') console.log(words[words.length-1].length) } }()
输入输出 第一次刷感觉挺好玩的。算是顺利的