Why DART is cooler than JavaScript

In this article, i am going to explain new feature of DART in compression to JavaScript.
  • 1766

DART is cooler than JavaScript

DART  is a object oriented new programming language, developed by Google in October, 2011. The DART come in to existence in place of  JavaScript, because it provide better functionality and fast performance than JavaScript. There are some reasons about DART  developed by Google to used in place of JavaScript.

  • DART can work with types

    In DART if you want to work with types, just enable the type checker and go ahead.
     
  • Classes and interface

    DART also provide the better functionality of classes and interface, you can use it like a object based programming language.
     
  • Inheritance

    In DART , classes is present and therefore does now the extends keyword .Pretty damn simple in compression to JavaScript.
     
  • Global namespace

    DART have libraries, means if you have a keyword library, you must be understood by what is public visible outside of it.
     
  • DART knows concurrency

    DART knows isolate, but JavaScript thing are not concurrent.
     
  • DART knows foreach

    In JavaScript foreach loop is not present, but you can use foreach in DART.
     
  • Weirdness  intializing arrays

    In DART, an array is basically a List.

Example

void main() {

 var a = null;

 var list=[1,2,3,4,5];

 

 if(a!=null){

   print("Not null");

 }

 else{

   print("Value of a is null");

 }

 for(var ax in list){

    print(ax);

 }
}


Output:

dartnew.jpg

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 
© 2019 DotNetHeaven. All rights reserved.