Files
wren/test/language/assignment/compound_subscript_list.wren

21 lines
324 B
Plaintext
Raw Permalink Normal View History

2019-09-29 12:41:02 -07:00
var list = [1,2,3,4]
list[0] += 10
System.print(list[0]) // expect: 11
list[1] -= 3
System.print(list[1]) // expect: -1
list[2] *= 9
System.print(list[2]) // expect: 27
list[3] /= 2
System.print(list[3]) // expect: 2
2019-10-01 00:51:22 -07:00
list[0] <<= 2
System.print(list[0]) // expect: 44
list[2] >>= 1
System.print(list[2]) // expect: 13