Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Show inventory JS code

  • Loading branch information...
commit bae624fd2ab635bf5cbf531b658fef29a980d7ee 1 parent 491aa47
@nikhilm authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 slides.rst
View
19 slides.rst
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.