Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
In 2nd line of code, 'write' shows in red. everything displays as expected, but workspace text for write shows red, why?
Accessing through different browsers produces same result, all text is green or black but for the word: write
any input much appreciated!
Kindest Regards, Angi
Steven Parker210,423 Points
What you are seeing is called "syntax highlighting".
The editor attempts to color things to help them stand out based on what they are. In this case, it's using red to indicate object properties and methods. So write appears in red because it is a method of document.
Dejan Došenović8,679 Points
There is nothing wrong with your code. The text of the word 'write' is red because the font color of the workspace is so set. In text editor of your choice there is a difrent theme set, that's whay it is green.
If the syntax is underlined with a red line then there is something wrong.