- JavaScript
- Ruby
- Crystal
- Python
Start training on this collection. Each time you skip or complete a kata you will be taken to the next kata in the series. Once you cycle through the items in the collection you will revert back to your normal training routine.
DescriptionEdit
// Első megoldási kísérletem, de nagy számokkal hibásan fut le
function isDivisibleBy6(s) {
let finStrgArr = [];
let splitted = s.split('');
let asterisk = splitted.indexOf('*');
for (let i = 0; i < 10; i++) {
splitted[asterisk] = i;
if (splitted.reduce((a, b) => a + b, 0) % 6 === 0) {
finStrgArr.push(splitted.join(''));
}
}
return finStrgArr;
}