+ 2
Why do some of the examplsle codes written in ' ' form but also in " "
Semi colon
4 Respuestas
+ 4
Depends on the language. Mostly it does not matter. In php the variables are recognized in " " but in ' ' not.
+ 2
Because it's sometimes necessary. For example you will face problem if you only use "" for setting an attribute in html.
//Error and not functional:
button.onclick = "function("red")";
//Fixed code and functional:
button.onclick = "function('red')";
+ 1
Thank you soo much
+ 1
Usually ' ' are used for single characters (letters), and " " are used for strings.
Im most languages it doesn't really matter, but it depends