Fundamental
JavaScript - Fundamental 3 ways to use JavaScript Embedded in html (inline) - not recommend < body > < a href = "javascript:alert('hello')" > click </ a > </ body > Internal < body > < script > alert ( "hello" ) </ script > </ body > External < body > < script scr = "js/hello.js" ></ script > </ body > alert ( "Hi there!" ) JavaScript syntax // print console . log () //dialog alert( "hello" ) // write content to html page document . write ( "hello" ) // get data type - typeof var num = 'xx' console . log ( typeof num ) //out: string JavaScropt data types number var num = 10; string var sex = 'male' ; var sex = "female" ; boolean var flag1 = true ; var flag2 = false ; undefined and null (2 special types in Js) object - complex type(a collection of various values) Narrow object va...