{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture+09+-+JS+1 - CS170Lecture9 Javascript1 KristianStout...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 170 Lecture 9  Javascript 1 Kristian Stout [email protected] Office IN: Livingston Student Center, A lounge near “the rock” and the commuter lounge. Office Hours: TTH 5:30 – 6:30
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
What Javascript Is ... Programming Language INPUT -> PROCESSING -> OUTPUT Formal language with syntax and rules Written directly in HTML Dynamic not compiled does it's “thing” at run-time
Image of page 2
What Javascript Is Not ... Not a markup language Not the only programming language.  Not the only way to make pages dynamic. Not Java.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Why choose Javascript? Runs natively in browsers don't need a development environment, debugger  or IDE you have the tools on your computer to use it right  out of the box One important disadvantage of choosing JS to  learn programming Not very robust (compared to compiled languages) type issues, initialization issues, spurious error  messages
Image of page 4
Embedding JS in HTML Use the <script>  </script> tag Best practice: put <script> </script> in the  head with smaller blocks in the  <body></body> This class: put <script>  </script> in the  body
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
we start our script tag This is required this tells the browser to print out “Hello World!”
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern