Function not execute initially

I have a function to display the left and right arrows when the content width exceed the screen width. But it’s not executing initially instead it only executed when the scroll or resize event triggered. Pls help me to resolve this issue.

Hello and welcome to forum;
I guess nobody can understand the problem without sharing the code. Also I don’t have the skills to code blindfolded and compile yet. Sorry. Can you share your related code or project link please?

Hey @sowmiya0211 - welcome to the freecodecamp.

Please feel free to share a sample reproducer code or a link to your online Git repo so the community can help further.

Regards,
Farath

Thank you so much for your response @0x74h51N and @farisoft . I found the solution already.

1 Like