I have a function in javascript that returns two values:
function today_date() {
var t = new Date();
var day = t.getUTCDay();
var dayW = t.getDay(); // Day of de week (0-6).
return [day, dayW];
}
When I call this function (within another function) I whant only one of this values.
function print_anything() {
console.log("Today is the " + today_date() + " of the month.");
}
I know it's a very basic and newbie question. But how do I do that?