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 316 views
1 answer 244 views
2 answers 348 views
1 answer 279 views
1 answer 222 views
222 views asked Dec 10, 2022 by avibootz
1 answer 290 views
...