That was just about the same prompt as I used.
I've used ChatGPT only recently for programming. Had a project to finish, got tired and bored with looking up stuff I half knew and just asked it to finish the job. It seemed to get the intention of the code well despite no context provided. It even taught me a few things.
I've previously seen it produce code that looked correct and well done, but was just gibberish with a little bit of analysis.
So yes, I agree it can be useful in an area where you have some expertise, saving time, but I wouldn't trust it otherwise.