var stu_names = ['Jhon','Alice','Mik'];
var stu_score = [300,200,400];
for (var i = 0; i < stu_names.length; i++) {
for(var j = 0; j < stu_score.length; j++) {
console.log(`Score of ${stu_names[i]} is ${stu_scrore[j]}`);
}
}
I want to get the result like
'Score of Jhon is 300' 'Score of Alice is 200' 'Score of Mike is 400'
But instead of it, I m getting this result
Score of Jhon is 300
Score of Jhon is 200
Score of Jhon is 400
Score of Alice is 300
Score of Alice is 200
Score of Alice is 400
Score of Mik is 300
Score of Mik is 200
Score of Mik is 400