2017年8月1日
摘要: Roman Numeral Converter 将给定的数字转换成罗马数字。 所有返回的 罗马数字 都应该是大写形式。 Roman Numerals Array.splice() Array.indexOf() Array.join() 思路: (1)把所给的数字拆分成数组; (2)将其倒序之后利用 阅读全文
posted @ 2017-08-01 17:22 lailailee 阅读(253) 评论(0) 推荐(0) 编辑
摘要: Diff Two Arrays 比较两个数组,然后返回一个新数组,该数组的元素为两个给定数组中所有独有的数组元素。言之,返回两个数组的差异。 ComparisonOperators Array.slice() Array.filter() Array.indexOf() Array.concat() 阅读全文
posted @ 2017-08-01 12:41 lailailee 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Sum All Numbers in a Range 我们会传递给你一个包含两个数字的数组。返回这两个数字和它们之间所有数字的和。 最小的数字并非总在最前面。 会用到的函数 Math.max() Math.min() Array.reduce() 思路: (1)通过Math.max(),Math.m 阅读全文
posted @ 2017-08-01 00:07 lailailee 阅读(426) 评论(0) 推荐(0) 编辑