From 6d24b879f2753a1f67f73e0ca79b8b6923465871 Mon Sep 17 00:00:00 2001 From: Akshay Tiwari <37179627+tvibhu12@users.noreply.github.com> Date: Thu, 7 Mar 2019 01:04:12 +0530 Subject: [PATCH] Update catch-mixed-usage-of-single-and-double-quotes.english.md (#35532) --- .../catch-mixed-usage-of-single-and-double-quotes.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/catch-mixed-usage-of-single-and-double-quotes.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/catch-mixed-usage-of-single-and-double-quotes.english.md index 7315232cf0..9dd10ec2a5 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/catch-mixed-usage-of-single-and-double-quotes.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/catch-mixed-usage-of-single-and-double-quotes.english.md @@ -6,7 +6,7 @@ challengeType: 1 ## Description
-JavaScript allows the use of both single ('') and double ("") quotes to declare a string. Deciding which one to use generally comes down to personal preference, with some exceptions. +JavaScript allows the use of both single (') and double (") quotes to declare a string. Deciding which one to use generally comes down to personal preference, with some exceptions. Having two choices is great when a string has contractions or another piece of text that's in quotes. Just be careful that you don't close the string too early, which causes a syntax error. Here are some examples of mixing quotes:
// These are correct:
const grouchoContraction = "I've had a perfectly wonderful evening, but this wasn't it.";
const quoteInString = "Groucho Marx once said 'Quote me as saying I was mis-quoted.'";
// This is incorrect:
const uhOhGroucho = 'I've had a perfectly wonderful evening, but this wasn't it.';