Skip to content

Add expected output examples to all snippets #75

Description

@ManuelPauloAfonso

Proposal: Add expected output examples to snippets

Problem

Currently, each snippet shows the JavaScript code to run in DevTools,
but there is no indication of what the output looks like after execution.
This makes it harder for newcomers to know if the snippet ran correctly
or how to interpret the results.

Proposed Solution

Add an "Expected Output" section below each snippet with a realistic
example of what appears in the console. For example:

Snippet: LCP

// Expected output:
LCP: 1240ms  Good

Snippet: CLS

// Expected output:
CLS: 0.05  Good

Benefits

  • Helps beginners understand what a "good" result looks like
  • Makes it easier to verify the snippet ran correctly
  • Improves the learning experience without changing the snippets themselves

Scope

All snippets across all categories (Core Web Vitals, Resources, Scripts, etc.)

Contribution

I am willing to contribute with a PR implementing this improvement
if the proposal is accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions