Link Search Menu Expand Document
Table of contents
  1. Capturing Calls
  2. Capturing calls in functions
  3. Printing logs and output

Check out the original file to see the original source.

Capturing Calls

Local calls to console are captured, and the results shown as a blockquote.

console.log(/* message: */ "hi, log");
console.error(/* message: */ "hi, error");
console.warn(/* message: */ "hi, warn");
console.info(/* message: */ "hi, info");
console.debug(/* message: */ "hi, debug");

log: hi, log

error: hi, error

warn: hi, warn

info: hi, info

debug: hi, debug

Capturing calls in functions

Logs are shown in the block they’re used, not in the block they’re declared.

const fn = () => {
  console.log(/* message: */ "hi2");
};

In the following block, there will be a console blockquote.

fn();

log: hi2

Printing logs and output

If a block has output and logs, the log comes first.

fn();
("Hello!");

log: hi2

"Hello!"

This document used eval-md