You can access the value of an expression inside a string by using ${expression} . var greeting = “Hello”; var person = “Rohan”; print(“${greeting}, ${person}!”); // prints “Hello, Rohan!” If the expression is an identifier, the {} can be skipped.
You can access the value of an expression inside a string by using ${expression} . var greeting = “Hello”; var person = “Rohan”; print(“${greeting}, ${person}!”); // prints “Hello, Rohan!” If the expression is an identifier, the {} can be skipped.