题解 | #统计大写字母个数#
统计大写字母个数
https://www.nowcoder.com/practice/434414efe5ea48e5b06ebf2b35434a9c
let str = readline().split(""); let count = 0; str.map((item) => { if (/[A-Z]/.test(item)) { count ++; } }); console.log(count);
统计大写字母个数
https://www.nowcoder.com/practice/434414efe5ea48e5b06ebf2b35434a9c
let str = readline().split(""); let count = 0; str.map((item) => { if (/[A-Z]/.test(item)) { count ++; } }); console.log(count);
相关推荐