Difference between revisions of "WebFund 2016W Lecture 2"

From Soma-notes
Jump to navigation Jump to search
(Added administration notes.)
(Created "What's different about JavaScript?".)
Line 30: Line 30:
** [[Fundamentals_of_Web_Applications:_Winter_2016_Course_Outline#Grading|Midterm date has been tentatively created.]]
** [[Fundamentals_of_Web_Applications:_Winter_2016_Course_Outline#Grading|Midterm date has been tentatively created.]]
** [[WebFund_2016W:_Assignment_1|Assignment #1 has been posted.]]
** [[WebFund_2016W:_Assignment_1|Assignment #1 has been posted.]]
====JavaScript: As a Language====
* JavaScript has '''nothing''' to do with Java.
** Why is it even called JavaScript then? At first it wasn't; it was developed as Mocha, changed to LiveScript and then finally renamed to JavaScript due to an agreement with Sun (acquired by Oracle).<ref name="Stackoverflow">[http://stackoverflow.com/a/2475528]</ref>
* The only similarity between Java/JavaScript is some of the syntax, but that can be said for a lot of languages.
* What's different about JavaScript?
** No declared data types; it's a "loose" language.
*** Instead of int i = 0, it's simply var i = 0.
** There's seven data types<ref name="Stackoverflow">[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures (examples in brackets).
]</ref>
*** Boolean (true, false)
*** Number (3.1337, 1337, etc. There's no integer or long, everything is a float)
*** String ("Dave")
*** Symbol
*** Object
*** Null
*** Undefined

Revision as of 16:13, 13 January 2016

Video

The video from the lecture given on January 12, 2016 is now available.

Notes

In-class Notes

Lecture #2
----------
JavaScript

* no declared types
  - strings
  - objects
  - arrays
  - numbers (floats)
  - boolean

With Node
 - asynchronous (non-blocking) I/O


Student Notes

JavaScript: As a Language

  • JavaScript has nothing to do with Java.
    • Why is it even called JavaScript then? At first it wasn't; it was developed as Mocha, changed to LiveScript and then finally renamed to JavaScript due to an agreement with Sun (acquired by Oracle).<ref name="Stackoverflow">[1]</ref>
  • The only similarity between Java/JavaScript is some of the syntax, but that can be said for a lot of languages.

]</ref>

      • Boolean (true, false)
      • Number (3.1337, 1337, etc. There's no integer or long, everything is a float)
      • String ("Dave")
      • Symbol
      • Object
      • Null
      • Undefined