This repository has been archived on 2021-10-25. You can view files and clone it, but cannot push or open issues/pull-requests.
|
<script lang="ts">
|
|
let count = 0;
|
|
|
|
function add() {
|
|
count += 1;
|
|
}
|
|
|
|
function subtract() {
|
|
count -= 1;
|
|
}
|
|
</script>
|
|
|
|
<div id="svelte" class="counter">
|
|
<button on:click={subtract}>-</button>
|
|
<pre>{ count }</pre>
|
|
<button on:click={add}>+</button>
|
|
</div>
|