<! DOCTYPE html>/*Script Tags*/</script>--> <!--<script>/*Write script tag first*/ if(true) {document.write ("Output is true") }Else{document.write ("Output is false") } </script>--> <!--<script>varA=prompt ("Please enter the day of the week?") "," 1 ");/*received is the string-& #45;& #45;*/ Switch(a) { Case"1": Alert ("Learning Today");/*Pop out Popup box*/ Break; Case"2": Alert ("J Rest"); Break; default: Alert (Tourism); } </script>--> <!--<script>varA=prompt ("Please enter the day of the week?") "," 1 ");/*received is the string-& #45;& #45;*/ varB=parseint (a);/*Convert a string to an integer type*/ Switch(b) { Case1: Alert ("Learning Today");/*Pop out Popup box*/ Break; Case2: Alert ("J Rest"); Break; default: Alert (Tourism); } </script>--><script>/*var a=123.0; alert (a);*/ /*var count=0; function Showstr () {count++; Alert ("Hello" +count)}*/Window.confirm ("Are you sure you want to delete this message?" "); Window.prompt ("Please enter the wish you wish to enter"); varA=123; //you need to convert the string to a string type varb= A + ""; document.write (b);</script>JS---Basic usage 2