CSCI-UA 4 Lecture Notes - Lecture 13: Javascript, Web Browser, Jquery

89 views4 pages

Document Summary

Javascript is loosely typed, meaning that a variable can have values that belong to different data types. Strings ( normal text i. e. "new york" ) Booleans ( a value is either true or false ) We declare a variable by doing: var x; var firstname; var isweekend; We can declare and define a variable by doing: var x = 10; var firstname = "al"; var isweekend = false; The first element in the array is located at index 0 of the array, this element is the first element at index 0 of the array. We declare an array by doing : var weekdays = new array(); We can declare and define an array in a few ways: var weekdays = ["m","t","w","th","f"]; or var weekdays = new array(); weekdays[0] = "m"; weekdays[1] = "t"; weekdays[2] = "w"; weekdays[3] = "th"; weekdays[4] = "f"; We may use key/value pairs in arrays to declare and define them.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents