[Dart] #2.1 Lists & collection if
List of integers. List numbers = [1,2,3,4]; var numbers = [1,2,3,4]; class called List! so, there are losts of methods you can use ex) numbers.first; = gives first item numbers.last; = gives last item var giveMeFive = true; if (giveMeFive) 5] ; if (giveMeFive) void main () { var giveMeFive = true; var numbers = [1, 2, 3, 4, if (giveMeFive) 5, ]; }
2024. 1. 10.