Dave's WordPress home in the Fediverse :-)

Another example of ChatGPT utility. "I have a function named Boo. Inside it has an icon that when you click it, it calls Boo to view the parent of the item. But I don't want it to call Boo directly because that leaves the previous instance of viewFeedItem around. In JavaScript what's the best way to defer the call to Boo so that the two instances are unrelated, and the first instance goes away." I was pretty sure as I wrote this that setTimeout was the answer, but ChatGPT offered it as the first choice, and explained why it was the best. It's like having a code consulant ready to help. And it really does help to know it parsed it the same way I did. #

Last update: 2/6/26; 2:41:25 PM.

Discover more from daveverse

Subscribe now to keep reading and get access to the full archive.

Continue reading