This post is from a low-reputation account and contains an unverified outbound link. Be cautious before clicking external links.

Steemit Hints & Tips - Code sample comments

Words
251
Reading
2 min
9y
Listen to this post
~2 min

This post is part of the Steemit Hints & Tips Serie!

Let me know in the comments if you have have nice ideas to share!

hr

Code sample comments

When we explain a piece of code in a post, we like to highlight the specific code lines with numbers / letters:

import { Injectable } from '@angular/core';

@Injectable()
export class RandomService {

    constructor() {}

    getRandomNumber(): number {
        return 4; // ๐Ÿ…ฐ
    }

    getReferenceUrl(): string {
        return "https://xkcd.com/221/"; // ๐Ÿ…ฑ
    }

}

๐Ÿ…ฐ Chosen by fair dice roll. Guaranteed to be random.
๐Ÿ…ฑ Inspiration for this brilliant algorithm, by xkcd.

You may choose among many different styles of letters and numbers.

โ‘  โ‘ก โ‘ข โ‘ฃ โ‘ค โ‘ฅ โ‘ฆ โ‘ง โ‘จ โ‘ฉ
โž€ โž โž‚ โžƒ โž„ โž… โž† โž‡ โžˆ โž‰
โถ โท โธ โน โบ โป โผ โฝ โพ โฟ
โžŠ โž‹ โžŒ โž โžŽ โž โž โž‘ โž’ โž“
โ“ต โ“ถ โ“ท โ“ธ โ“น โ“บ โ“ป โ“ผ โ“ฝ โ“พ
โ’ถ โ’ท โ’ธ โ’น โ’บ โ’ป โ’ผ โ’ฝ โ’พ โ’ฟ
โ“ โ“‘ โ“’ โ““ โ“” โ“• โ“– โ“— โ“˜ โ“™
๐Ÿ… ๐Ÿ…‘ ๐Ÿ…’ ๐Ÿ…“ ๐Ÿ…” ๐Ÿ…• ๐Ÿ…– ๐Ÿ…— ๐Ÿ…˜ ๐Ÿ…™
๐Ÿ„ฐ ๐Ÿ„ฑ ๐Ÿ„ฒ ๐Ÿ„ณ ๐Ÿ„ด ๐Ÿ„ต ๐Ÿ„ถ ๐Ÿ„ท ๐Ÿ„ธ ๐Ÿ„น
๐Ÿ…ฐ ๐Ÿ…ฑ ๐Ÿ…ฒ ๐Ÿ…ณ ๐Ÿ…ด ๐Ÿ…ต ๐Ÿ…ถ ๐Ÿ…ท ๐Ÿ…ธ ๐Ÿ…น
โ…ฐ โ…ฑ โ…ฒ โ…ณ โ…ด โ…ต โ…ถ โ…ท โ…ธ โ…น
๐ฐ๐ฑ๐ฒ๐ณ๐ด๐ต๐ถ๐ท๐ธ๐น
โ˜…โ– โ—๐ŸŸŠโ—†โ–ฎ๐ŸŸŒ
โ™šโ™›โ™œโ™โ™žโ™Ÿ
โ™  โ™ฃ โ™ฅ โ™ฆ

Remarks:

  • We prefer ๐Ÿ… over โ’ถ as they are more visible.

  • โš  Always have the unicode characters inside comments to allow copy pasting your code. Here, in Typescript, we use "//".

hr

Have a look at our Series:

Stay tuned! We're just getting started!