I got this simple function, and I want to console out the values in an array:
function findRoutes(routes) {
for (let value of routes) {
console.log(value)
} }
console.log(findRoutes([["MNL", "TAG"], ["CEB", "TAC"], ["TAG", "CEB"], ["TAC", "BOR"]]))
my console is:
["MNL", "TAG"]
["CEB", "TAC"]
["TAG", "CEB"]
["TAC", "BOR"]
undefined
What's that "undefined" at the end?