How to add new key value pairs to a map in Dart

1 Answer

0 votes
void main() {
    var map = {'dart': 13, 'c': 89, 'c++': 10};
    
    map['java'] = 29;
    map['python'] = 40;

    print(map);
}

  
  
  
/*
run:
  
{dart: 13, c: 89, c++: 10, java: 29, python: 40}
  
*/

 



answered Oct 11, 2022 by avibootz

Related questions

2 answers 165 views
1 answer 145 views
2 answers 202 views
1 answer 160 views
1 answer 130 views
130 views asked Dec 10, 2022 by avibootz
1 answer 179 views
...