As someone who is still fairly new to programming, I could really use some advice on best practices. Is there a more efficient approach to writing the code below, instead of using the replace() method multiple times?
const URL = 'user/profile/:id/result?size=:query';
const URI = URL.replace(':id', '1111').replace(':query', 100); //'user/profile/1111/result?size=100'