Spent an hour finding the bug in my javascript code, then finally gave a try to ChatGPT... Found the solution in first prompt only. I am amazed to see how it is getting better and catering all the aspect.