summaryrefslogtreecommitdiff
path: root/examples/script/qsdbg/example.js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/script/qsdbg/example.js')
-rw-r--r--examples/script/qsdbg/example.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/script/qsdbg/example.js b/examples/script/qsdbg/example.js
new file mode 100644
index 0000000..47c1363
--- /dev/null
+++ b/examples/script/qsdbg/example.js
@@ -0,0 +1,17 @@
+function bar() {
+ var x = 1;
+ var y = 2;
+ return x + y;
+}
+
+function foo(a, b, c) {
+ var i = a + bar();
+ var j = b - bar();
+ var k = c * bar();
+ return Math.cos(i) + Math.sin(j) - Math.atan(k);
+}
+
+var first = foo(1, 2, 3);
+var second = foo(4, 5, 6);
+print("first was:", first, ", and second was:", second);
+