DEV Community

Cover image for The use of if else statement in JavaScript
Kapgeradok
Kapgeradok

Posted on

The use of if else statement in JavaScript

function Major(Engineering){
    if(Engineering === 'Software Engineering'){
        return'Its a course of heroes, You can be proud of!';
        }
    else if(typeof Engineering === String){
        return `Which type of ${Engineering}?`
        }
    else
        {
            return'please parse in the type of Engineering for this case';
        }
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)