Why are " " + variable in the code


I'm just trying to find out why the " " + variable is necessary. just curious...

var foodDemand = function (food) {
    console.log("I want to eat" + " " + food);


Is it? How are you able to start with the premise that it is necessary?


I have the same question. The + operator should have returned syntax error as we couldn't add two strings.
I remember it from first few lessons.


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