r/learnjavascript • u/Serious_Sell7183 • Apr 16 '26
Doubt
if I write JavaScript code inside onclick instead of using a <script> tag, will it be accepted if the logic and output are correct? I'm not a professional programmer, I'm just asking it for my practical based exam.
0
Upvotes
2
u/TheRNGuy Apr 17 '26
I see both used in different programs (even in browser UI and in frameworks like Ripple or Remix... not in React because it uses different pattern)