I'm new to Javascript and learning some basics. Below is my code:
test({FirstName: "Codi",LastName: "Madison"}, function (reply) {alert(reply)});
function test(message) {
return "Hello " + message.FirstName + ' ' + message.LastName
}
I want to keep the function(reply) but how do I return a value to it? I have tried return but the alertbox doesn't fire, what am I missing. Sorry if this is stupid but I'm still learning. Thank you.
testto accept a second parameter - the callback function