Suninatas Game 01
challenges
Game 01
Code Analysis
1 | <% |
Replace(str, "a", "aad"): Replaces every 'a' with 'aad'.Replace(result, "i", "in"): Replaces every 'i' with 'in'.Mid(result, 2, 2): Extracts 2 characters starting from the 2nd index.Mid(result, 4, 6): Extracts up to 6 characters starting from the 4th index.- The goal is to make the final concatenated
resultequal toadmin.
Thought
If we input ami: - a -> aad
- i -> in - Intermediate result:
aadmin - result1 =
Mid("aadmin", 2, 2) = ad -
result2 = Mid("aadmin", 4, 6) =
min - result = ad +
min = admin