Javascript examples.
This commit is contained in:
parent
ecf9f96079
commit
48af60d829
76 changed files with 1685 additions and 0 deletions
10
Examples/javascript/namespace/runme.js
Normal file
10
Examples/javascript/namespace/runme.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
var example = require("./build/Release/example");
|
||||
|
||||
console.log("Global variable Foo=" + example.nspace.Foo);
|
||||
example.nspace.Foo = 5;
|
||||
console.log("Variable Foo changed to " + example.nspace.Foo);
|
||||
console.log("GCD of number 6,18 is " + example.nspace.gcd(6,18));
|
||||
|
||||
console.log("Creating some objects:");
|
||||
c = new example.nspace.Circle(10);
|
||||
console.log("area = " + c.area());
|
||||
Loading…
Add table
Add a link
Reference in a new issue