A Dart string is a sequence of UTF-16 code units. You can use either single or double quotes to create a string: – 다트 String은 UTF-16코드 개체의 연속(반복)입니당.

var s1 = 'Single quotes work well for string literals.';
var s2 = "Double quotes work just as well.";
var s3 = 'It\'s easy to escape the string delimiter.';
var s4 = "It's even easier to just use the other string delimiter.";

by using ${expression}. 요놈도 사용가능하고요.

var s = 'string interpolation';

assert('Dart has $s, which is very handy.' ==
'Dart has string interpolation, which is very handy.');

assert('That deserves all caps. ${s.toUpperCase()} is very handy!' ==
'That deserves all caps. STRING INTERPOLATION is very handy!');

If you run this code as JavaScript, without compiling to Dart, it prints “You have a name!” because name is a non-null object. However, in Dart running in production mode, the above doesn’t print at all because name is converted to false (because name ! = true). In Dart running in checked mode, the above code throws an exception because the name variable is not a bool. – 요거를 자바스크립트에서 실행하면 (다트에서 컴파일 안하고요..) 유 해브 어 네임 이 출력 되요. 왜냐면 name은 null이 아닌 객체잖아요. 하지만 Dart에서 production 모드로 실행하면 출력안해요. name 은 참이 아니고 false로 변환되서요. ㅠㅠ Dart checked mode 에서 실행하면요 이거 불값 아니데요?? 라면서 예외를 던집니당. ㅋㅋㅋ

Here’s another example of code that behaves differently in JavaScript and Dart:

if (1) {
print('JavaScript prints this line because it thinks 1 is true.');