题解 | #统计大写字母个数#
统计大写字母个数
https://www.nowcoder.com/practice/434414efe5ea48e5b06ebf2b35434a9c
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 const str = await readline() const upperLength = str.split(/[^A-Z]+/) let upperCount = 0 for(let i=0; i<upperLength.length; i++) { upperCount += upperLength[i].length } console.log(upperCount) }()