I've never used Dart and the post was very easy to follow.
How I understood about var in Dart is that, Dart keeps track of initial variable type while dynamic.
And shouldn't the example 4 use dynamic keyword?
// This is invalid Example this will workvoidmain(){dynamicx='Math pi';print(x);// Maths pix=3.14;print(x);// 3.14}
Thanks for the post, Nitish 👍
I've never used Dart and the post was very easy to follow.
How I understood about
var
in Dart is that, Dart keeps track of initial variable type whiledynamic
.And shouldn't the example 4 use
dynamic
keyword?Awesome!