String interpolation
Published in
1 min readApr 9, 2017
String interpolation is just some fancy term for combining variables and constants within a string.
For example a string like so:
Now we could simply print this out by doing:
We could also use this way:
But this way isn’t very efficient especially if your combining many different data types.
Let’s do an example with many data types:
Use math
You can easily use math within String Interpolation.