DEV Community

Cover image for Map in Dart
Coder
Coder

Posted on

Map in Dart

void main() {
  print('Om Namah Shivay');
//Map
  Map<int, String> planetOrder = {
    1: 'mercury',
    2: 'venus',
    3: 'earth',
    4: 'mars',
    5: 'jupiter',
    6: 'uranus',
    7: 'neptune',
    8: 'pluto',
  };

  //remove pluto
  planetOrder.remove(8);
  print(planetOrder);
}

Enter fullscreen mode Exit fullscreen mode

I understood

Top comments (0)