Skip to content

Code Blocks

Markdown code block

const btn = document.getElementById('btn');
let count = 0;
function render() {
btn.innerText = `Count: ${count}`;
}
btn.addEventListener('click', () => {
// Count from 1 to 10.
if (count < 10) {
count += 1;
render();
}
});

<Code> component

const foo = 'bar'

Text markers

function test() {
const foo = 'bar';
}
function test() {
const foo = 'bar';
}

Diff

function test() {
const foo = 'bar'
const foo = 'baz'
}

File name

test.js
const foo = 'bar';

Terminal window

Doing something…
pnpm run thing