+ 1
Any way to remember color coding?..
No pun intended :p But when Im typing in code I notice some text in the code is red, some is green, some is white, etc... What exactly is the color coding to it?.. Is it this way anytime you are writing code?.. I would just like to know because while typing it in I notice the colors and I feel It would help me not be so intimidated by it all.. lol
4 Réponses
+ 9
Almost Every playground has some colour coding, Example, variables are coloured pink, classes - blue,constants green etc...
You dont need to remember these.
+ 9
The color coding or syntax highlighting is just a feature of text editors, and they may be different when they detect that the source code is from a programming, scripting or markup language. They recognize the extension of the file after you save it.
It just helps you improve the readibility and context of the text, find errors more easily, internalise faster the semantics of the program, and even help you pay less attention to standard syntactic components (like keywords) so you can focus more on what you are looking for. Personally, it helps me spotting missing braces and ignoring or finding comments faster.
You can also make customizations if you wish to change the color scheme or even the User Interface theme of some text editors.
+ 4
This is call syntax highlighting. You don't need to memorize this.
Syntax highlighting helps you to understand the code better.
For example html elements, attribute and value will have different color (in most cases).