<script> and ends with
<script> var _welcomeMessage="Welcome to WebTrainingRoom"; window.alert(_welcomeMessage); </script>
In above example, we declared a variable called
_welcomeMessage, then assigned a string value within "".
var x=10;, now within the program you cannot write
var x="Hello World";
var Xare two different variables
<script src="~/scripts/yourJsFilename.js"> </script>
Switch case is very useful when you want to check either of multiple conditions, it works faster than if-else statement.