I am writing this as a lambda function which should Display a random string out of the declared array, but upon the time of execution, it displays "NULL". Please can anyone suggest me the correct code or syntax and tell me whats wrong with this code.
exports.handler = async (event) => {
let messages = ["AWS","Pranav","Hello World"];
let response = messages[Math.floor(Math.random()*100)];
return response;
};