Does the AI copilot choose let/const automatically in generated code?

Noticed the AI-generated workflows always use const for variables that don’t change. Impressed it avoids var completely. How reliable is this feature? Has anyone tested edge cases where the AI might choose let when const would be better?

The AI analyzes variable reassignment patterns to choose between let/const. In 200+ workflows I’ve generated, it’s never used var. For complex logic, you can force const declarations in the code settings.

Through extensive testing, I’ve found the Copilot correctly identifies constant variables 98% of the time. The 2% exceptions occur in nested promise chains where variable mutation isn’t obvious. You can override declarations manually, but the automated choice works well for most business automation scenarios.

yeah it’s pretty smart about it. i tried tricking it with loops and async stuff but it still picks right const/let most times. way beter than my junior devs lol