Message from JavaScript discussions

February 2019

— Kind of, at the same scope no. But if they’re in different scope they will be different variables with the same name.

Message permanent page


Hey Christian but my code is working out just fine like my function should be called two times, right?

— So when i am calling it for button 3, it should be called for the default value also

— And the final result would be of default value

— But result for button 3 is being displayed

— Can you explain why is this happening?

— Button 3 is executing logic(6)

— Use different button for default Akshat Pandey

— What if i don't want to use any button for default

— Is this possible?

— Like i open my page and the default results should already be displayed

— Html 🤷