Data variables store a single value in contract storage, updated with `var-set` and accessed with `var-get`.
clarity (define-data-var counter uint u0) (var-set counter (+ (var-get counter) u1))
100 XP to Apprentice
Single mutable storage variables.
AI translates the explanation and quiz text while preserving code and answer scoring.
Data variables store a single value in contract storage, updated with `var-set` and accessed with `var-get`.
clarity (define-data-var counter uint u0) (var-set counter (+ (var-get counter) u1))
1. Which function updates a data variable?
2. Which function reads a data variable?