Variable Modifiers
let int n1 = int 1;
n1 = add(n1, int 3); # n1 = 4
# We can use a variable modifier here instead
let int n2 = int 1;
n2.add(int 3); // n2 = 4let int n1 = 1;
let int n2 = n1.add(int 3); // Error - n1 = 4, n2 = compile error
//Instead you would do the following
let int n1 = 1;
let int n2 = add(n1, int 3); // n1 = 1, n2 = 4Last updated
Was this helpful?