Dev study and notes

[dart] #9 #2.1 Lists (04:06) 본문

studyLog

[dart] #9 #2.1 Lists (04:06)

devlunch4 2023. 4. 28. 23:52
반응형
void main() {
    // List
    var giveMeFive = true;
    var numbers = [
    1,
    2,
    3,
    4,
    if (giveMeFive) 5,
    ];
    numbers.add(100);
    print(numbers);
    print(numbers.first);
    print(numbers.last);
    // >>> PRINT
    // [1, 2, 3, 4, 5, 100]
    // 1
    // 100 
}
반응형
Comments