r/badcode • • Oct 01 '21

js yeah thanks bro

Post image
170 Upvotes

15 comments sorted by

View all comments

Show parent comment

4

u/AchillesDev Oct 02 '21

Yeah but you shouldn’t hardcode it in the same file all on one like like that. Keep it in a separate file and import it, and it’s much cleaner (and reusable).