Help me: Javascript 3.parameter point 2,error :expected [Function


#1


#2

It wouldn't be much of a program if we had to provide it with completed string output in our inputs. The instructions speak of interpolation, which in loose terms means with data injected, or in maths, implied.

There are two forms of interpolation, one from JS of old, and the new one from ES6+ which is the JS evolving currently. The old uses concatenation. That is, joining two strings with the plus (+) operator.

"string one" + "string two"

When we include a variable, the type is coerced to string whether we specify it or not.

 n = 42

console.log("string one" + n + "string two")    // string one42string two

Using this information, rewrite your code so the call expression only contains the topping string. The console.log in the function will be the interpolated string output.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.