Submitted over 2 years agoA solution to the Advice generator app challenge
Advice generator
bootstrap
@calebomondi

Solution retrospective
I encountered a problem on where I placed my script and this affected whether my js function was called or not on button click. If I placed it in the head section, on button click the function was not called but if placed it immediately after the button element, the function is called successfully. In some other cases, for the function to be called, its vice versa. If anybody has a well understanding of JS, how does this come about ??
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on caleb mokua's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord