示例工程 01-orientation
01-orientation/01-console-family/index.html
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>01 · console 家族一览</title>
</head>
<body>
<p>请打开开发者工具 Console 面板。</p>
<script type="module">
import { run } from './main.js';
// 用灰色旁注区分「讲解」与「被演示的 console 输出」
run((s) => console.log(`%c${s}`, 'color:#888'));
</script>
</body>
</html>