Dart by Example: Values

  1. main() {
  2. // Strings can be appended using +
  3. print("dart" + "lang");
  4. // Integers and Floats
  5. print("1+1=${1+1}");
  6. print("7.0/3.0 =${7.0/3.0}");
  7. // Booleans
  8. print(true && false);
  9. print(false || true);
  10. print(!true);
  11. }
  12.  
  1. $ dart values.dart
  2. 1+1=2
  3. 7.0/3.0 =2.3333333333333335
  4. false
  5. true
  6. false

by @jryanio | source | license