How to Post Your Code With Radiant, Harmonious Formatting

You can get your code to format properly by surrounding it in triple backticks and typing the programming language name. This:

enemy = self.findNearestEnemy()
if enemy:

becomes this:

enemy = self.findNearestEnemy()
if enemy:

you can also highlight it and press ctrl+k

1 Like

How do you post a new link not a reply??? :confounded:

you press the little + at the top right of the post

while(true) {
var friend = hero.findNearestFriend();
if(friend) {
hero.say("To battle, " + + “!”);
// Now find the nearest enemy and tell them to go away.
var enemy = hero.findNearestEnemy;
if(enemy) {
hero.say(“Go away ,” +;
So… that?

Actually, not quite. However, it has been greatly simplified. All you need do now, is to click on the </> button and post your code between the dots:


While True:
    yourCode = "looks like this"