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.
Unit 1 - Build a Quiz challenge
I am having problems with my code.
Mark Casavantes2,867 Points
Please post your code so we can help you.
Posted on Apr 23, 2014 by Dave McFarland Posting Code to the Forum An important part of asking for help and giving answers in the Forum is showing your code. The Treehouse Forum lets you embed HTML, CSS, Ruby, Java and other code in your posts. To display code, wrap it in one back tick character (for inline code) or three back ticks (for code blocks).
Note that the back tick character isn't the same as the single quote — ' — mark; the back tick is located on the same key as the ~ on most keyboards.
Inline Code If you want to post code within a paragraph like this — var x = 1; — then just surround that code with one back tick on either side of the code:
var x = 1;
Code Blocks Create a code block when you need to show multiple lines of HTML, CSS, Ruby, Java or other code. To create a code block:
Hit return twice -- this creates a new line and adds a space between the code block and any text above it. (It's important to make sure you have an empty line above and below your code block, or else the code formatting doesn't always work.)
Type three back tick characters: ```
Hit return to create another new line and paste or type your HTML, CSS or other code.
Hit return and add three more back tick characters: ```
Hit return again to create an empty space below the code block.
var x = "Hello world!"; console.log(x);
And here’s what it would look like:
var x = "Hello world!" console.log(x);