<script> const function_with_parameter = parameter => () => { console.log(`The passed parameter was: ${parameter}`) } </script> <body> <button on:click="{function_with_parameter('foo')}"> </body>