Creating a Svelte Component

A Svelte component is defined in a single file with <script>, <style>, and HTML sections.

Snippet:

<script>\nlet message = "Hello Svelte!";\n</script>\n<p>{message}</p>

Example:

<script>\nlet name = "John";\n</script>\n<p>Welcome, {name}!</p>