-
-
Notifications
You must be signed in to change notification settings - Fork 44.1k
Bonfire allows use of str.prototype.repeat. #4250
Copy link
Copy link
Closed
Labels
status: on the roadmapLong term plans and features.Long term plans and features.
Description
Challenge Bonfire: Repeat a string repeat a string has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
I think this could end up being misleading to beginner programmers who don't realize that repeat is a preexisting function in JS that takes a number as its argument. Is there a way to restrict the use of repeat for this exercise? I think this would be very valuable to have someone create their own repeat function either through loops or recursion.
My code:
function repeat(str, num) {
if(num < 0){
return "";
}
return str.repeat(num);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: on the roadmapLong term plans and features.Long term plans and features.