Skip to content

Commit 0b6f7d2

Browse files
authored
Merge pull request #945 from adi-ray/patch-1
Fix Markdown backtick escaping in Variables and Change tutorial [2.0 branch]
2 parents 13ba042 + 5ff83a9 commit 0b6f7d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/tutorials/en/variables-and-change.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ In the template above, you use [`mouseX`](/reference/p5/mouseX) and [`mouseY`](/
124124

125125
##### String Interpolation
126126

127-
In [Get Started,](/tutorials/get-started) you learned that strings are [data types](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures) that are always surrounded by quotation marks (`""`). To use variables and strings together, we can use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) to help us! Template literals begin and end with backticks (`\`\``) instead of quotation marks (`""`). You can type any character in between the backticks to generate a string like in [this example](https://editor.p5js.org/Msqcoding/sketches/pfSJLvxOB). You can include a variable in the string using the `${}` placeholder, and by placing the name of the variable inside the curly brackets like in [this example](https://editor.p5js.org/Msqcoding/sketches/8sM-h5Hd9).
127+
In [Get Started,](/tutorials/get-started) you learned that strings are [data types](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures) that are always surrounded by quotation marks (`""`). To use variables and strings together, we can use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) to help us! Template literals begin and end with backticks (`` ` ``) instead of quotation marks (`""`). You can type any character in between the backticks to generate a string like in [this example](https://editor.p5js.org/Msqcoding/sketches/pfSJLvxOB). You can include a variable in the string using the `${}` placeholder, and by placing the name of the variable inside the curly brackets like in [this example](https://editor.p5js.org/Msqcoding/sketches/8sM-h5Hd9).
128128

129129
Visit [string interpolation](https://www.geeksforgeeks.org/string-interpolation-in-javascript/) (example 2),  [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals), or the p5.js reference page for [string](/reference/p5/String) to learn more!
130130

0 commit comments

Comments
 (0)