As a counter argument - I assume that Anthropic is using AI to write Claude Code.
I've read and heard in videos that Javascript is a pretty good language for AI to write code in. Apparently this is because there is so much training data out there. Also Javascript avoids problems of multi threading and memory management that can mess up the AI in other "more performant" languages.
So maybe Javascript is not the worst choice for writing software fast with AI
I feel like a year ago JavaScript and Python were the best languages for coding agents to use because of their heavier presence in the training data, but I'm not sure that's true any more now.
The latest frontier models are competent at Rust and Swift and all manner of other less widely used languages.
The more important factor is how good they language's compiler is at kicking out actionable error messages, since one-shot code generation isn't as important once you have a coding agent loop.