Dev study and notes

[dart] #2 - #1.1 The Var Keyword (03:07) AND #1.2 Dynamic Type (03:35) 본문

studyLog

[dart] #2 - #1.1 The Var Keyword (03:07) AND #1.2 Dynamic Type (03:35)

devlunch4 2023. 4. 28. 14:30
반응형
void main() {
    var name = 'devlunch4';
    print(name);

    String name = 'devlunch4';
    print(name);

    dynamic name;
    name = 123;
    if (name is String) {
        print(name.trim());
    }
    if (name is int) {
        print('name:');
        print(name);
        print('name.bitLength:');
        print(name.bitLength);
    }
}
반응형
Comments