I am trying to dynamically generate some empty space based on an integer values.
I thought the following would work :
function createTab(level) {
let y = "";
for (let i = 0; i < level; i++) {
y = y + " ";
}
let x = <span>{y}</span>;
return x
}
However JSX renders this in quoting the y value within the span elements. The quoting is causing the   to be displayed as text.
what am I doing wrong?