JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<p>Set the variable to different value and then try...</p>
</body>
</html>
JavaScript
function addBook(book){
if( book == "history" ){
document.write("<b>History Book</b>");
}else if( -1 != ["maths", "mathematics","arithmetics"].indexOf(book.toLowerCase()) ){
document.write("<b>Maths Book</b>");
}else{
document.write("<b>Unknown Book</b>");
}
}
addBook("Maths");
addBook("mathematics");
addBook("Arithmetics");