Below is my code
function returnEmptyTd(num) {
for(var i=0; i <= num; i++) {
console.log(i);
return(
<td class="empty"></td>
)
}
}
If num is 2, I will get two empty td return. If num is 5, I will get five empty td return.
But I can only get one with this code, even I pass 5 to num.
How to fix it?