Word Weight Turing

Опубликовано: 02 Июнь 2026
на канале: Ahmad Faraz CodeCraft
134
10

JavaScript: Word Weight



A character's corresponding integer is equal to the position of the character in the alphabet.
Given a work "s" and an integer "n", you need to apply the following steps in the given order and return the resulting integer.

Replace the characters in the word "s" with their corresponding integers. pass the resulting integer to the next step.
Sum up the digits of the integer. Repeat this step n times.