xxxxxxxxxx
int result;
switch (str) {
case "A" -> result = 1;
case "B" -> result = 2;
case "C" -> {
result = 3;
System.out.println("3!");
}
default -> {
System.err.println("Unexpected value: " + str);
result = -1;
}
}
xxxxxxxxxx
exports.handler = (event, context, callback) => {
// Assign the support case and update the status message
var myCaseID = event.Case;
var myMessage = event.Message + "assigned...";
var result = {Case: myCaseID, Message: myMessage};
callback(null, result);
};