跳到主要内容
在正文中添加了2个字符
来源 链接
阿列约科
  • 1.1公里
  • 9
  • 15

我更喜欢使用面向函数的解决方案方式编程(映射一个阵列例如):

数组.from(str).map((字母,i)=>i==0?letter.toUpperCase():letter).join('');

我更喜欢使用面向函数的解决方案方式(映射数组例如):

数组.from(str).map((字母,i)=>i==0?letter.toUpperCase():letter).join('');

我更喜欢使用面向函数的解决方案编程(映射一个数组):

数组.from(str).map((字母,i)=>i==0?letter.toUpperCase():letter).join('');
主动阅读。
来源 链接
彼得·莫特森
  • 31.6万
  • 22
  • 109
  • 132

我更喜欢使用面向解决方案的方式,而不是功能性方式(映射数组例如。例子):

数组.from(str).map((字母,i)=>i==0?letter.toUpperCase():letter).join('');

我更喜欢使用面向解决方案的方式,而不是功能性方式(映射数组例如。):

数组.from(str).map((字母,i)=>i==0?letter.toUpperCase():letter).join('');

我更喜欢使用面向解决方案的方式,而不是功能性方式(映射数组例子):

Array.from(str).map((letter,i)=>i==0?letter.toUpperCase():letter).join('');
来源 链接
阿列约科
  • 1.1公里
  • 9
  • 15

我更喜欢使用面向功能的解决方案(例如映射数组):

数组.from(str).map((字母,i)=>i==0?letter.toUpperCase():letter).join('');