Created
July 5, 2021 15:42
-
-
Save lega911/d6f930f4b47e7fed5335be83d692a423 to your computer and use it in GitHub Desktop.
Insert block of JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
const styleDiv = el => { | |
el.style.border = '2px dotted red'; | |
el.style.padding = '8px'; | |
} | |
</script> | |
<div {* styleDiv($element) }> | |
{* $element.textContent = 'inserted text' } | |
</div> | |
{#each 5 as i} | |
{* const value = i**2 } | |
{i}**2 = {value} | |
<br/> | |
{/each} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment