Markdown Code Formatting

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

Single line Code

This an inline `<paste code here>` code formatting with a single backtick (`) at start and end around the code.

See also: :yin_yang: Compose Mode | :snowflake: Gitter Formatting Basics

Typing Backticks:arrow_heading_up:

QWERTY and QWERTZ (Key that’s been marked with red border)

AZERTY France (Alt Gr + Key that’s been marked with red border)

AZERTY Belgium (Alt Gr + Key that’s been marked with red border)

QWERTY Estonian (Key’s that have been marked with red border)

Estonian Keyboard layout

2 Likes

Just a quick note, on my Macbook Pro I have to hit cmd + return for the code to be posted to the chat.

also I do not need to type the second set of ticks as they are added automatically.

Perhaps this post needs updated?

2 Likes

Thanks for posting this little note @JTMKoenig Very helpful.

1 Like

Ahhh - that’s where I find the backtick. Thank you! :slight_smile:

1 Like

If you still have trouble, you can use this: https://alexanderkopke.github.io/poster/
Just paste in the code, and press the button.
The backticks are added to your code and copied to the clipboard, ready to be pasted into the chat or wherever github markdown lives.

6 Likes
function convertToF(celsius) {
  var fahrenheit;
  // Only change code below this line
  
  9 / 5 * 30 + 32;
  // Only change code above this line
  return fahrenheit;
}

// Change the inputs below to test your code
convertToF(30);
1 Like
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  // Your code below this line
  document.getElementById("demo").innerHTML= result;
  
  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
1 Like

I’m trying to split strings with split. The task, you should split the string by its spaces is still marked x.
var string = “Split me into an array”;
var array = [];

// Only change code below this line.

array = string;
var array= string.split(‘s’);

thanks brutha! gonna start referencing this in the gitterHelpRoom