This solution is inspired by my_first_calculator.py. It works for all lowercase alphabetic strings of length 3. The generated (non-evaled) version is 17,582 lines of code.
constreverse=eval(`str => {
${[...newArray(26).keys()].map(x=>[...newArray(26).keys()].map(y=>[...newArray(26).keys()].map(z=>[x,y,z].map(n=>String.fromCharCode(n+'a'.charCodeAt(0)))))).flat().flat().map(([x,y,z])=>` if (str === '${[x,y,z].join('')}') return '${[z,y,x].join('')}'`).join('\n')}
throw new RangeError(
'Sorry, your string is not supported yet. Please try again in 3–6 months.'
)
}`)
When I open the "my_first_calculator.py" file it took so long, I thought something was wront with the git site ou my internet was down. Then I saw the file and I understood
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
❤️ this challenge
This solution is inspired by my_first_calculator.py. It works for all lowercase alphabetic strings of length 3. The generated (non-
evaled) version is 17,582 lines of code.When I open the "my_first_calculator.py" file it took so long, I thought something was wront with the git site ou my internet was down. Then I saw the file and I understood