Web Scripting
Week 2
Data
Strict-mode -> must declare variables
When defining a variable, it returns the value hence can use that to define another value to it
Numbers
+ - * / %
Math.round() floor() random() //0 -> 0.9
Bool
&& || !== != <> ===
String
“” + .length
<> //alphabetical
Infinity = 2 to the 53
Infinity – infinity = not a number
X -> hexa-decimal
O -> octal
B -> binary
== abstract equality
=== equality -> exact same item
When x ===x == false then x is Not a Number (NaN)
!!x -> change x into a Boolean value
Functions
Use JSON for file system
Functions can be held as a value stored in a variable
Downwards scope so code can use anything created above it
Other
For (var char of word)
MDN, you don’t know java series
Week 1
Aims
Identify best professional practices
Use those practices
Critically evaluate design and implement changes into applications
Plan
JS browser-side
JS server-side
API’s & architecture
Coursework Support
Assessment
Weekly download of Q-unit tests (formative)
Coursework 50% all year (spiral methodology)
48-hour hackathon 25% (client-side from scratch)
48-hour hackathon 25%(client and server from existing)
Coursework
Drag and drop window management
Use JavaScript only
Example code
View port fixed size for tablets
:// html to be used server-side
Web sockets to link server to client via ports
Event listeners(load, connect listener)
When load add a new event handler
Parse binary into code
Stringfy code into binary to system or server
NPM node package manager