🛠️Syntax Highlighting
Also known as Code Highlighting
Each part of the code gets its own colour, so it is easy to read.
Think of it like
Think of it like colouring a map. Roads are red, rivers are blue, and you see the shape at a glance.
Example
Jack forgets to close a quote. Every line after it turns green like a string, and he spots the slip in a second.
Why it matters
Colours let your eyes find the parts of a line without reading every word. Many small slips show up as odd colours.
Definition
Common mistake
Key takeaways
- 1Colour by part. Keywords, strings and comments each get one.
- 2Only for reading. Colours never change what the code does.
- 3Shows slips. A wrong colour points at a typo.