How To Learn Javascript Properly
Week 1

Professional JavaScript for Web DevelopersSo for starters I’ve purchased “Professional JavaScript for Web Developers” to work through.

What I’ve learned –

  • I knew this but it was something I felt like sharing.  The <noscript> tag is used to display content if js is disabled or unavailable.
  • A closing </script> tag is required for XHTML to validate the script.
  • You can use the defer in Html 4.01 to load js after all the content for the page has loaded and async in Html5 to load js while other content is loaded.  Handy for increasing page load speeds. Here’s an example below.
    <script type="text/javascript" defer src="example1.js" ></script>
    <script type="text/javascript" async src="example1.js" ></script>