Hi! If there is room for one more question, here is where I'm stuck with this app 🙊
I started working in a single file. Then made attempt to break it into modules. And when I move those plus and minus event listeners to a separate file, I can't properly pass the NEW_LETTERS value back to the main app.
Hi! If there is room for one more question, here is where I'm stuck with this app 🙊
I started working in a single file. Then made attempt to break it into modules. And when I move those
plus
andminus
event listeners to a separate file, I can't properly pass the NEW_LETTERS value back to the main app.Created new branch to illustrate it github.com/ptifur/javascript-pract...
Perhaps you could guide me in the right direction 🤓
Easiest would be to write a function
setNewLetters
(choose whatever name) in your script.js that sets the value for you.So you can then call this function in your event listeners and update your variable this way. Skips passing values back and forth, back and forth.
Thanks for the insight!
Didn't know you can call the functions both ways. Guess this will save me some time stumbling through tutorials 😜