1. Operator && functions

  int x = 5;

  x++;
  ++x;
  x--;
  --x;
  x = x + 5;
  x += 5;
  x -= 5;
  x *= 5;
  x ~/= 5;

  bool isEqual = 5 == 10;

  String myString = 'Hello $isEqual';
  print(myString);
  
  
  final myInteger = 5;
  if (myInteger == 10) {
    print("It's ten!");
  } else if (myInteger == 9) {
    print("It's nine!");
  } else if (myInteger > 20) {
    print("Greater than twenty!");
  } else {
    print("Oh, it is something else!");
  }
  
  switch (myInteger) {
    case 10:
      print("It's ten!");
      break;
    case 9:
      print("It's nine!");
      break;
    default:
      print("Oh, it is something else!");
  }
  
  for (int i = 0; i < 10; i++) {
    print(i);
  }
  bool condition = true;
  while (condition) {}

  /*✅ condition이 거짓이 될때까지 실행됨. 조건이 항상 참이 아닌 경우 1번은 실행된다. */
  do {
    print("Hello world");
  } while (condition);
  
  void main(List<String> arguments) {
  String myStringFunc() {
    return "Hello";
  }

  print(myStringFunc());
  print(myStringFunc2());
}
/*✅ scope에 대해서 인지하기*/
String myStringFunc2() {

  myStringFunc1();
  return "Bye";
}

'Flutter' 카테고리의 다른 글

[F] 4. Non-Nullable  (0) 2021.09.03
[F] 3. 변수  (0) 2021.09.03
[F] 2. 프로젝트 시작하기  (0) 2021.09.03
[F] 1. VSC 설정하기  (0) 2021.09.03

+ Recent posts