var a = "text"+(conditional?a:b)+" more text"
现在用模板文字我会做..
let a; if(conditional) a = `test${a} more text`; else a = `test${b} more text`;
是否有更优雅的方式来实现这种条件?是否可以包含快捷方式?
let a = `test${conditional ? a : b} more text`;