How to have output :
ID: 0001
Name: Mike
Birthday: London 21/05/1989
Hobby: Reading
My below code is undefined, I want the array city + date to be together in the birthday.
My code was not, check my code below :
var input = [
["0001", "Mike", "London", "21/05/1989", "Reading"],
["0002", "Sara", "Manchester", "10/10/1992", "Swimming"],
["0003", "John", "Kansas", "25/12/1965", "Cooking"],
["0004", "Dave", "Nevada", "6/4/1970", "going to gym"]
];
var data = ["ID: ", "Name: ", "Birthday: ", "Hobby: "];
for(var i = 0 ; i <= input.length ; i++){
for(var j = 0 ; j <= input.length ; j++){
for(var i = 0 ; i <= data.length; i++){
console.log(data[i] + input[j][i])
};
};
};
Is that any suggestion to fix this logic ? I just want to use the loop, for this.