Solve this JavaScript code golf challenge: write a function that replaces variables in a string. Go!

2 967
20.2
Опубликовано 9 марта 2026, 16:00
A small but practical challenge. Write a function that replaces variables in a string using values from an object or dictionary. We’ve got a compact JavaScript version that does it in 61 characters using regex. Can you come up with a shorter solution? Use any language but make sure your solution can handle missing keys and repeated variables. Share your approach below!

Subscribe to Google for Developers → goo.gle/developers

Speakers: Christine Rafla
автотехномузыкадетское