Use something like this instead:
var obj = {hair: "yellow", eyes: "blue"};
var format = "{hair} {eyes}";
// Option 1: manual replacement
var result = format.replace('{hair}', obj.hair).replace('{eyes}', obj.eyes);
console.log(result);
// Option 2: automatic replacement
var result = format;
for(var key in obj){
result = result.replace('{' + key + '}', obj[key]);
}
console.log(result);
Build a template string, then use string manipulation to replace the fields.
If you can use ES6, it allows for template literals out of the box:
var obj = {hair: "yellow", eyes: "blue"};
var result = `${obj.hair} ${obj.eyes}`;
console.log(result);