about | help | code help+videos | done | prefs |
Given an array and a non-negative integer n, return an array consisting of n copies of the original array. repeat([3, 4], 2) → [3, 4, 3, 4] repeat([10, 20, 30], 3) → [10, 20, 30, 10, 20, 30, 10, 20, 30] repeat([1], 5) → [1, 1, 1, 1, 1] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 200
Copyright Nick Parlante 2017 - privacy