1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-29 09:30:20 +02:00

mut keyword explanation

This commit is contained in:
gavr123456789
2025-03-17 14:55:58 +02:00
parent f1771a1435
commit bd0a4b6a51

View File

@@ -55,6 +55,7 @@ list = {1 2 3}
set = #(1 2 3) set = #(1 2 3)
map = #{1 'a' 2 'b'} map = #{1 'a' 2 'b'}
// declare a mutable variable
mut x = 5 mut x = 5
x <- 6 // mutate x <- 6 // mutate
``` ```