+ 1

What is output of this code?

//What is output this code let a = 8;let b = 34; let msg = `The sum is ${a+b};//`;fun(msg); console.log(2); function fun(msg) { console.log(1); } The next answers: 1) answer 1 2) answer 2 3) error 4) answer 1 2 5) answer 2 1

5th May 2019, 5:59 AM
vitalii
vitalii - avatar
2 Answers
+ 1
1. Please copy your snippet in code playground and run to see the results yourself. 2. Please read about Template Literal, third page in this lesson: https://www.sololearn.com/learn/JavaScript/2969/
5th May 2019, 6:08 AM
Gordon
Gordon - avatar
+ 1
Thanks for answer. I know the rules in ES6. Why you don't the right answer. It is simple play.
5th May 2019, 9:22 PM
vitalii
vitalii - avatar