var light = 'green';

switch(light){
    case 'red' :
        console.log("stop");
        break;
    case 'yellow' :
        console.log("get ready");
        break;
    case 'green' :
        console.log('go');
        break;
    default :
        console.log('it is not red, green and yellow');
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: