Permalink
Browse files

Introduce main()

  • Loading branch information...
1 parent 4e3bb28 commit 8b6a38cc02db9dd46ae4ad423f82d43419674c13 @tnhu committed Apr 26, 2012
Showing with 33 additions and 0 deletions.
  1. +19 −0 LICENSE.txt
  2. +14 −0 samples/main.js
View
19 LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2009-2012 Tan Nhu
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
14 samples/main.js
@@ -0,0 +1,14 @@
+Class({
+ constructor: function(name) {
+ this.name = name;
+ },
+
+ getName: function() {
+ return this.name;
+ },
+
+ main: function(Person) {
+ var p = new Person("Rika");
+ console.log(p.getName());
+ }
+});

0 comments on commit 8b6a38c

Please sign in to comment.