Both console.log("story" + name + "story")
and console.log("story", name, "story")
works just fine as mentioned in earlier answers.
I will still suggest of having a habit of console.log("story", name, "story")
, because, if trying to print the object contents, like json object, having "story" + objectVariable + "story"
will convert it into string.
This will have output like : "story" [object Object] "story"
.
Just a good practice.