While number types behave as you'd expect from grade school math, strings are a different story. It's possible to insert variables and literal values directly into text by starting with a $ character, which is called string interpolation. The interpolated values are added inside curly brackets, just like using the LogFormat() method. Let's create a simple interpolated string of our own inside LearningCurve to see this in action:
Print out the interpolated string inside the Start() method directly after ComputeAge() is called:
Thanks to the curly brackets, the value of firstName is treated as a value and is printed out inside the interpolated string:
It's also possible to create interpolated strings using the + operator, which we'll get to right after we talk about type conversions.