diff options
Diffstat (limited to 'doc/src/snippets/code/src_script_qscriptengineagent.cpp')
-rw-r--r-- | doc/src/snippets/code/src_script_qscriptengineagent.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_script_qscriptengineagent.cpp b/doc/src/snippets/code/src_script_qscriptengineagent.cpp new file mode 100644 index 0000000..649d782 --- /dev/null +++ b/doc/src/snippets/code/src_script_qscriptengineagent.cpp @@ -0,0 +1,12 @@ +//! [0] +var a = Math.random() + 2; +//! [0] + + +//! [1] +function cube(a) { + return a * a * a; +} + +var a = cube(3); +//! [1] |