I am trying to add multiple values for the same output "Maths book". I think I am missing something basic on how to format values in brackets.
<script type="text/javascript">
<!--
var book = "maths";
if (book == "history") {
document.write("<b>History Book</b>");
/*How to add more options below besides "maths" so the output will be "Maths
Book". I want the output to be "Maths Book" also when user enters
mathemathics, mata, maths book...
Do I need more else if lines or I can put additional values in in brackets*/
} else if (book == "maths") {
document.write("<b>Maths Book</b>");
} else {
document.write("<b>Unknown Book</b>");
}
//-->
</script>
<p>Set the variable to different value and then try...</p>