summaryrefslogtreecommitdiffhomepage
path: root/scala.html.markdown
diff options
context:
space:
mode:
authorHa-Duong, NGUYEN <cmpitg@gmail.com>2015-08-03 15:50:32 +0700
committerHa-Duong, NGUYEN <cmpitg@gmail.com>2015-08-03 15:50:32 +0700
commitdbdde5134b4c5777467a81c8fdf2128cb44edacc (patch)
tree4ffd52dbcaa6983932014c37b0da6cf990e59ed8 /scala.html.markdown
parent5b683b34ddb313b8981f360c4a6b54cfbc3af396 (diff)
scala: clearer comments
Diffstat (limited to 'scala.html.markdown')
-rw-r--r--scala.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/scala.html.markdown b/scala.html.markdown
index 0bd1a56d..8d93169b 100644
--- a/scala.html.markdown
+++ b/scala.html.markdown
@@ -122,12 +122,12 @@ s"We have $n apples" // => "We have 45 apples"
// Expressions inside interpolated strings are also possible
val a = Array(11, 9, 6)
-s"My second daughter is ${a(0) - a(2)} years old." // => "My second daughter is 5 years old."
+s"My second daughter is ${a(0) - a(2)} years old." // => "My second daughter is 5 years old."
s"We have double the amount of ${n / 2.0} in apples." // => "We have double the amount of 22.5 in apples."
-s"Power of 2: ${math.pow(2, 2)}" // => "Power of 2: 4"
+s"Power of 2: ${math.pow(2, 2)}" // => "Power of 2: 4"
// Formatting with interpolated strings with the prefix "f"
-f"Power of 5: ${math.pow(5, 2)}%1.0f" // "Power of 5: 25"
+f"Power of 5: ${math.pow(5, 2)}%1.0f" // "Power of 5: 25"
f"Square root of 122: ${math.sqrt(122)}%1.4f" // "Square root of 122: 11.0454"
// Raw strings, ignoring special characters.