You have learned about decision making in JavaScript using if-else statements in our previous article on if – else statements in JavaScript. You have seen in previous article that you…