javascript-exercises icon indicating copy to clipboard operation
javascript-exercises copied to clipboard

Exercise 2: Add solution that uses built-in method

Open nik-rev opened this issue 1 year ago • 1 comments

I feel like learners at this stage are likely to use a for loop so they may find it interesting to know that there is a built-in way of doing it. Of course just using it as the solution would defeat the point of the exercise so I've added it as a second solution

Maybe it could make sense to make this the solution, and the original solution will become commented out.

nik-rev avatar May 03 '24 02:05 nik-rev

I'm hesitant on this one.

I believe the intention of the exercise is to get learners to get more practice with using loops. The hint quite firmly suggests this, but I feel for the exercise's intent, if loops are what it wants the learner to practise, it would be better placed in the actual exercise instructions instead of the hints section.

Basically saying that even though there is a built in string method for repeating strings, we want to practise loops so do it manually with loops instead. That way, they're also made aware of the string method.

mao-sz avatar Jun 29 '24 15:06 mao-sz

I'm hesitant on this one.

I believe the intention of the exercise is to get learners to get more practice with using loops. The hint quite firmly suggests this, but I feel for the exercise's intent, if loops are what it wants the learner to practise, it would be better placed in the actual exercise instructions instead of the hints section.

Basically saying that even though there is a built in string method for repeating strings, we want to practise loops so do it manually with loops instead. That way, they're also made aware of the string method.

I've repurposed this PR

nik-rev avatar Aug 09 '24 17:08 nik-rev