Permalink
Browse files

Show inventory JS code

  • Loading branch information...
1 parent 491aa47 commit bae624fd2ab635bf5cbf531b658fef29a980d7ee @nikhilm committed Jan 18, 2012
Showing with 19 additions and 0 deletions.
  1. +19 −0 slides.rst
View
@@ -172,6 +172,25 @@ C string -> v8::String
Simple objects
--------------
+\
+\
+\
+
+.. code-block:: js
+
+ exports.Inventory = function() {
+ this.items = 257;
+ }
+
+ // later
+ var iv = new Inventory();
+ console.log(iv.items);
+
+This is the classic object oriented JS style
+
+Simple objects
+--------------
+
.. code-block:: cpp
:include: simpleobject/main.cc
:start-at: Handle<Value>

0 comments on commit bae624f

Please sign in to comment.