<script>
  let word="Hello";
  let category=[];
  let categoryToAdd="";
  let selectedCategory="?";
  const addCategory=() => {
   if(categoryToAdd){
	 console.log(categoryToAdd);
	 category.push(categoryToAdd);
	 console.log(category);
	 categoryToAdd="";
	 category=category;
	}
  }
</script>



<h1>{word}</h1>
<input type="text" bind:value={categoryToAdd} />
<button on:click={addCategory}>Add</button>
<select bind:value={selectedCategory}>
   {#each category as c}
      <option>{c}</option>
   {/each}
</select>
<style>

</style>
