Fix fibonacci example.

This commit is contained in:
Stephen Chung 2021-09-21 10:41:09 +08:00
parent a6b78944c9
commit 562731c154
2 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ Example
The [`scripts`](https://github.com/rhaiscript/rhai/tree/master/scripts) subdirectory contains sample Rhai scripts. The [`scripts`](https://github.com/rhaiscript/rhai/tree/master/scripts) subdirectory contains sample Rhai scripts.
Below is a the standard _Fibonacci_ example for scripting languages: Below is the standard _Fibonacci_ example for scripting languages:
```js ```js
// This Rhai script calculates the n-th Fibonacci number using a really dumb algorithm // This Rhai script calculates the n-th Fibonacci number using a really dumb algorithm
@ -93,7 +93,7 @@ fn fib(n) {
} }
} }
print(`Running Fibonacci(28) x ${REPEAT} times...`); print(`Running Fibonacci(${TARGET}) x ${REPEAT} times...`);
print("Ready... Go!"); print("Ready... Go!");
let result; let result;

View File

@ -12,7 +12,7 @@ fn fib(n) {
} }
} }
print(`Running Fibonacci(28) x ${REPEAT} times...`); print(`Running Fibonacci(${TARGET}) x ${REPEAT} times...`);
print("Ready... Go!"); print("Ready... Go!");
let result; let result;