mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
example: improve json example
This commit is contained in:
parent
8bc0c31f29
commit
8488f7d82b
@ -20,7 +20,10 @@ fn main() {
|
||||
for i, user in users {
|
||||
println('$i) $user.name')
|
||||
if !user.can_register() {
|
||||
println('Cannot register $user.name, they are too young')
|
||||
println('Cannot register $user.name, he is too young')
|
||||
} else {
|
||||
users[i].register()
|
||||
println('$user.name is registered')
|
||||
}
|
||||
}
|
||||
// Let's encode users again just for fun
|
||||
|
Loading…
Reference in New Issue
Block a user