--- id: 5d67880ee0696bdec46938e3 title: Part 36 challengeType: 0 dashedName: part-36 --- # --description-- Now we are can consolidate the code inside the `goTown` and `goStore` functions. Copy the code inside the `goTown` function and paste it in the `update` function. Then delete all the code inside the `goTown` and `goStore` functions. # --hints-- See description above for instructions. ```js assert( (() => { update(); return ( goTown.toString() === 'function goTown() {}' && goStore.toString() === 'function goStore() {}' && button1.innerText === 'Go to store' && button2.innerText === 'Go to cave' && button3.innerText === 'Fight dragon' && text.innerText === 'You are in the town square. You see a sign that says "Store".' && update.toString().match(/button1\.onclick\s*\=\s*goStore\;?/) && update.toString().match(/button2\.onclick\s*\=\s*goCave\;?/) && update.toString().match(/button3\.onclick\s*\=\s*fightDragon\;?/) ); })() ); ``` # --seed-- ## --before-user-code-- ```html