I strongly disagree. Lua somehow maintains a positive reputation, but it’s extremely quirky and weird in many ways. It has some Perl-esque rough edges (#array for length), and some “let’s be different” design decisions that are counterintuitive and unnecessary (arrays starting at the 1 index instead of 0).
JavaScript as it is today is a vastly more ergonomic and fluid experience, and I am saying this as someone that has written tons of both.
The embedding experience with Lua is likely much more form fit than JavaScript (sandboxing, etc). I’m strictly speaking about syntax and language features.