0

const string = `something ${1 + 2 + 3}` const string2 = `something ${foo() ? 'x' : 'y'}` // what is the output and how ?

I need More explain

9th Mar 2020, 10:45 AM
Anas
Anas - avatar
1 ответ
0
Output In string: something 6 // you can write functions and operations in ${} In string2: something x // if function foo() returns true something y // if function foo() returns false
9th Mar 2020, 12:49 PM
_yaroslavv [online_everyday]
_yaroslavv [online_everyday] - avatar