Code blocks
If you need you code to be shown in a full block use the code block icon or press CTRL/CMD + SHIFT + J
Alternatively you can start a new line and type ``` (3x backtick) to begin. You can now type your code. Press Enter when you are finished to have it formatted as a code block. Use Shift+Enter to add a new line of code and Enter again to finish.
Inline code
Select the text you want to highlight as inline code and press the inline code button or press CTRL/CMD + J