【发布时间】:2020-04-01 14:52:44
【问题描述】:
请帮我解决这个问题:
给定x 和y。
案例 1:x = 10 和 y = 4;
// x represents the array length and y represents allowed number limit in array
应该返回[0, 1, 2, 3, 4, 0, 1, 2, 3, 4]
案例 2:x = 13 和 y = 3;
应该返回[0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0]
x 和 y 应该是动态的
【问题讨论】:
-
您的问题将被否决,因为您正在寻找答案而不尝试自己解决问题。你需要展示你自己尝试过的一些努力。
标签: javascript arrays ecmascript-6