JavaScript易忘笔记

  • if you assign a value to variable that has not yet been declared, the variable will automatically be declared as a GLOBAL variable.

       This statement: carname="Volvo";will declare the variable carname as a global variable , even if it is executed inside a function.(http://w3schools.com/js/js_functions.asp)

      example: alert("HellonHow are you?"); (http://w3schools.com/js/js_popup.asp)

发表评论