Understanding delete

A couple of weeks ago, I had a chance to glance through Stoyan Stefanov’s Object-Oriented Javascript. The book had an exceptionally high rating on Amazon (12 reviews with 5 stars), so I was curious to see if it was something worth recommending. I started reading through chapter on functions, and really enjoyed the way things were explained there; the flow of examples was structured in such nice, progressive way, it seemed even beginners would grasp it easily. The book claims that “function is treated as a normal variable—it can be copied to a different variable and even deleted.”. >>> var sum = function(a, b) {return a + b;} >>> var add = sum; >>> delete sum true >>> typeof sum; "undefined" Ignoring a couple of missing semicolons, can you see what’s wrong with this snippet? So what’s going on in this example? To answer this question, we need to understand how delete operator works in Javascript: what exactly can and cannot be deleted and why. Theory§ var x = 1; delete x; // false x; // 1
Writing Object-Oriented JavaScript Part 1
Download source - 8.21 Kb Introduction ASP.NET and Visual Studio 7.0 are making important contributions to the improvement of the web development experience. Unfortunately, there is also a tendency created among developers to limit their interaction with JavaScript. Clearly JavaScript is valuable for adding client-side functionality to web pages. There are several reasons why JavaScript object-oriented capabilities are not fully utilized: The tendency of client-side operations to be discrete favoring procedures. But writing JavaScript procedurally creates another set of undesirable conditions: Task duplication due to the decoupling of data and functions. We can enhance our scripts and eliminate these problems by writing JavaScript in an object-oriented fashion. Writing object-oriented JavaScript will be presented in a series of three articles. Principles of Object-Oriented Programming in JavaScript Abstract Data Types Encapsulation Inheritance Polymorphism Demo Conclusion History Version 1.0
Data Visualization | Fragile Earth Studios
Particle System Cloud Visualization Just a little something I cooked up while working on a fish population visualization. This was pretty quick, about a half hour’s work – perhaps with some more love a visualization like this using real data will make it into TerraViz. We could certainly add a lot more to this, for instance playing with the particle system transparency (instead of just having points be on/off). It’s easy to adjust color, size, etc. on a per-particle basis to do multidimensional analysis. As an example: we could use... read more 2012 Federal Virtual Worlds Challenge After receiving an impressive array of entries to the 2012 Federal Virtual Worlds Challenge, the Army Research Laboratory’s, Simulation and Training Technology Center recently awarded Fragile Earth Studio’s “TerraViz” product 2nd place in its “Holodeck” category. Thoughts about Initial Scenes in IM-TEL worlds This morning I was thinking about how to illustrate a virtual world used for Immersive Intelligence.
Recursive Tagging
Space of linked nodes
Related:
Related: