The proposal and its examples show static usage
a = [1, 2, 3, 4]
a[1:3]
// → [2, 4]
Eventually the question will be raised if access can be done dynamically by an expression:
Whether it's by variables
i = 1
j = 3
a[i:j]
// → [2, 4]
Or with operators
i = 2
j = 2
a[--i:++j]
// → [2, 4]
Or other expressions
i = () => 1
j = () => 3
a[i():j()]
// → [2, 4]
The proposal and its examples show static usage
Eventually the question will be raised if access can be done dynamically by an expression:
Whether it's by variables
Or with operators
Or other expressions