So this is my first time asking a question on stack overflow. My program is super simple and is just a practice that my friend is having me do to learn more about coding. Long story short here is my code:
let blocks = [
['H','L','S','J','U','B'],
['O','O','N','O','S','O'],
['M','V','O','Y','A','O'],
['E','E','W','' ,'' ,'' ]
];
let blocks_run = function(i,j) {
while (i < blocks.length) {
return blocks[i][j] + blocks_run(i+1,j)
}
}
blocks_run(0,0);
for some reason, the response always returns undefined at the end.
e.g.
HOMEundefined
I just want to know why it's adding undefined to the end.
Thanks in advance!