Skip to content

Commit

Permalink
ctc variable
Browse files Browse the repository at this point in the history
  • Loading branch information
xhliu committed Aug 7, 2024
1 parent 06b7fa2 commit 41b1646
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/how-to-write-a-contract/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ export class MyLib extends SmartContractLib {
@method()
static sum(x: number) : bigint {
let sum = 0n;
// Note: `x` is a variable here <--------
for (let i = 0n; i < x; i++) {
sum += i
}
Expand Down

0 comments on commit 41b1646

Please sign in to comment.