The Dart programming language was released by google just over two years ago. Dart looks a bit like C and is an object-oriented programming language. Dart is not only used for mobile app development but is a programming language. Approved as a standard by European Computer Manufacturer's Association (ECMA-408). When Dart is used in web application it is transpiled to JavaScript to it will run in web browsers.
Dart is a bit like JavaScript in that:
- Dart has type inference. The data type of a variable need not be explicitly declared, as Dart will “infer ”what it is. In Java, a variable needs to have its type explicitly given during declaration. For example, String something;. But in Dart, the keyword is used instead like so, var something;. The code treats the variable according to whatever it contains, be it a number, string, bool or object.
- All data types are objects, including numbers. Uninitialized variables have a value of null.
- A return type of a method is not required in the method signa