Day 4: Template Strings
-
Krizzu 9 years ago TO ANYONE STRUGGLING:
YOU HAVE TO USE ` INSTEAD OF ' or ".
You can find that key under the 'Esc' button, to the left of 1, above the 'tab' button on your keyboard.-
trendsetter37 9 years ago I believe this is referred to as a backtick. For what it's worth.
-
davidmeza 9 years ago Oh wow. Glad I came here. Only 5 minutes wasted hah.
-
SebetheWombat 9 years ago Thank you! I had no idea what I was doing wrong.
-
-
jonmcclung 9 years ago So, today's challenge was an excercise in Ctrl+C, Ctrl+V?
-
TheMadness 9 years ago hahaha! that's one way to look at it. I considered it a typing practice... learning the backtick ES6 feature was cool though.
-
-
PRASHANTB1984 9 years ago hint: use backticks
-
rajatsharma9895 9 years ago var my_template_string =
My name is ${my_name}. My id is ${my_id}. My address is ${my_address}.
; what is wrong with this?-
gabrielhidasy 9 years ago You are missing a few newlines (\n) after the first two dots
-
-
-
sasankadx 9 years ago var my_template_string =
My name is
{my_id}.My address is ${my_address}
; I'm using backticks. still giving error what's wrong with my code?-
nisar_ahmed 9 years ago Give a space after each full stop (.) and make sure each sentence is on a new line.
-
viktor_korolyuk 9 years ago Use (\n) to go to new line in a string.
-
-
ayse_gul5212 2 years ago var my_template_string =
My name is
${my_name}.+
\n+
My id is ${my_id}.
+\n
+My address is ${my_address}.
; works like a charm.
Sort 41 Discussions, By:
Please Log In in order to post a comment