Logic building and problem solving

please tell me how can we improve our logic building in coding
andpls let me know coding websites free for practices

You can improve by writing more code and asking people to code review it.
(Or compare your solution to others)

Free code camp has many JavaScript exercises in the curriculum website which is linked above in the menu :point_up:

There are different levels of difficulty available and a section for coding interview preparation as well.