Andy Saini5,287 Points
Although a single quote wrapped string is faster, why does Jason use double quotes wrapped strings in all his videos?
Due to string extrapolation, a single quote wrapped string is supposed to be faster than the double quote wrapped counterpart. Why does Jason use the latter in all the videos?
True, single quotes for names can suffice. Just as long as you're aware that the possible error might occur, and know how to fix it. : ) Happy coding!
I always use double quotes. Using single quotes can sometimes return unwanted results, such as when your string has an apostrophe in it. Then you would need to add a back-slash before the apostrophe to tell the computer to ignore/accept the apostrophe. Using double quotes bypasses this problem and the computer interprets the string correctly. A lot of the teachers in these videos only use single quotes, but I see it as a bad practice. I always use double quotes for strings. Hope this helps!