What is the purpose of the 'var' keyword in Dart?

  • To create a function in Dart
  • To declare a variable with an explicit type
  • To define a constant value
  • To import external libraries in Dart
The 'var' keyword in Dart is used to declare a variable without specifying its data type explicitly. Dart's type inference system assigns the appropriate data type based on the assigned value.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *