JavaScript: Memory, Passing, and Objects
CS 115 Computing for the Socio-Techno Web Brian Brubach
JavaScript: Memory, Passing, and Objects CS 115 Computing for the - - PowerPoint PPT Presentation
JavaScript: Memory, Passing, and Objects CS 115 Computing for the Socio-Techno Web Brian Brubach JavaScript Primitive Data Types string number boolean true or false null undefined symbol JavaScript
CS 115 Computing for the Socio-Techno Web Brian Brubach
var x = “word”; var y = 12; someFunction(x, y);
function someFunciton(hot, cold){ var warm = hot + cold; return warm; }
actually stored var z = [“dog”, “cat”, “bee”]; document.write(z[1]); // Prints “cat” document.write(z.length) // Prints “3”
“dog” “cat” “bee” 1 2 3 length Location: <someAddress> Block of memory storing the array that z points to or refers to
var z = [“dog”, “cat”, “bee”]; // stored at <someAddress> someFunction(z);
<someAddress>
// Change z to [“dog”, praying mantis”, “bee”] function someFunction(animals) { animals[1] = “praying mantis”; }
var a = null;
(IMPORTANT case)
is not a number. It attempts to convert the argument to a number
is a number
!isNaN(x)
student-fact-checkers/
http://johnbrieger.com/blog/?p=321 (accessed 4-25-19)
legendary creatures from Japan”
togetherness
as reference without checking
in the top right corner of the page
_Japan&diff=next&oldid=738160684
quickly, but they are logged in the edit history
might be their point of view
duplication