Add dynamic condition result on App.svelte

I added the dynamic condition result example. It would be nice to showing this basic example on the tutorial, Svelte can do many things that is easy to understand even with the beginner.
pull/7279/head
jakasulthon 5 years ago committed by GitHub
parent 39f0d8cc31
commit 62c617eda4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,8 @@
<script> <script>
let x = 7; let x = 7;
function incrementNumber() {
x += 1;
};
</script> </script>
{#if x > 10} {#if x > 10}
@ -9,3 +12,7 @@
{:else} {:else}
<p>{x} is between 5 and 10</p> <p>{x} is between 5 and 10</p>
{/if} {/if}
<button on:click={incrementNumber}>
Add number
</button>

Loading…
Cancel
Save