FunctionRacerProblemsRace

Defanging an IP Address

BeginnerStringsPython, JavaScript, TypeScript, Java, C++

Return the string you get by replacing every . in address with [.].

Example 1

address "1.1.1.1"
returns "1[.]1[.]1[.]1"

Each dot becomes [.]: 1[.]1[.]1[.]1.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Strings problems