One dash quotations. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

One dash quotations.

Why do words require the one dash quatation such as 'Word' while numbers do not?

3rd Feb 2017, 2:20 PM
Brett
1 Answer
+ 3
It differentiates strings and characters from integers and decimal values such that: 1 + 1 = 2 since we're adding 2 integers while '1' + '1' = '11' since we're concatenating 2 strings.
4th Feb 2017, 8:41 AM
Alysson Alvaran
Alysson Alvaran - avatar