Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Traffic lights drill
- function doTrafficLights() {
- const activeLight = getActiveLight();
- if(activeLight === 'red') {
- turnRed();
- } else if(activeLight === 'green') {
- turnGreen();
- } else {
- turnYellow();
- }
- };
- //Error alert drill
- function main() {
- try {
- doAllTheThings();
- } catch(err) {
- console.error(err);
- reportError(err);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement