Check out example codes for "switch case google script". It will help you in understanding the concepts better.

Code Example 1

switch (email)  {
        case "basdf":
            email = "[email protected]";
            break;
        case "dfdsa":
            email = "[email protected]";
            break;
        default:
            email = "[email protected]";
            break;
    }

Learn ReactJs, React Native from akashmittal.com