Yeah, I should be clear: the specific context in which I often see junior developer quality performance is when I'm essentially "pair programming" with it. I can say, "Write a program that does X. No, there's a closed-form solution for that, so we shouldn't write it recursively. OK, now write some tests similar to the following. You have a bug in that function."
I almost never need to actually write code—I can explain what I want and it will frequently do something plausible.
The main limit seems to be the context window. And ChatGPT's tendency to be ignore corrections and simply restate the original code.
Ironically, to get the best results, I need to call on my experience and my people skills. Someone who knew nothing about programming wouldn't be able to "mentor" the chatbot successfully.