> you need to plug the device into its bigger brother
This exactly is the challenge. If your first computer is a mobile device, you would not have that “bigger brother” available.
iOS does have Swift Playgrounds [1] and Android has the excellent Termux [2] but access to the built-in JavaScript engine would open a whole new set of possibilities.
I was introduced to programming on a dinky little graphing calculator. My hope is that other “first computers” could offer similar opportunities for tinkering.
However, iOS more so than Android, has plenty of mature interactive code environments.