我对CamelCase持怀疑态度。假设你有这样的缩写词:Unesco = United Nations Educational, Scientific and Cultural Organization.你应该这样写:unitedNationsEducationalScientificAndCulturalOrganizationgetUnescoProperties();
这样写对吗?getUnescoProperties()
我的步骤是将字符串放入数组中,然后循环查找空格,并在下面的索引处大写字母,然后如果语句完成,我希望将所有不是空格的字符推送到一个新数组并连接,但是大写字母没有显示在最后的数组中。 console.log(str) let finalStr = [];
let camelCase= str.toLowerCase().split(