大小写转换转载
原创标题:将大写转换为小写,将小写转换为大写;例如,“AbC”?“aBc”。
解析:
function processString (s) { var arr = s.split(); var new_arr = arr.map((item) => { return item === item.toUpperCase() ? item.toLowerCase() : item.toUpperCase(); }); return new_arr.join(); } console.log(processString(AbC));

转载于:https://www.cnblogs.com/anbozhu7/p/11276018.html
版权声明
所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除
相关文章
最新文章
- An animated explainer of the PHP2SHell vulnerability [video] 28分钟前
- Sound of a guitar string cooling down on a piezo contact mic [video] 31分钟前
- How to fix your life in 1 day 34分钟前
- Ming dynasty statue unearthed in WA returns to China 1小时前
- Google has officially turned these Nest thermostats back into dumb thermostats 2小时前
- Show HN: Omni Verify, my AI agent can't post until Kane checks every promise 2小时前
- Club Cobra's Instagram page returns after 9-month battle with Meta 2小时前
- Finding Flaws in Technical Documentation 2小时前
- WikiCity – Explore 100k Wikipedia Articles as a 3D City 2小时前
- The Hackening 3小时前
itfan123


