I am trying to create a function that takes in three parameters, creates a variable that assigns all three strings, to one printable string on three lines. I have tried the following:
function generateHaiku(a, b, c) {
var haiku = 'a\nb\nc';
return haiku;
}
var example = generateHaiku("hi", "its", "me");
console.log(example);
but instead of returning the haiku, it returns a b c
i want it to return
hi its me (hi on first line, its on second line, me on third line)
what am i doing wrong?