I've embedded both and used them heavily in my various window managers, and these days I personally recommend embedding JavaScript over Lua if possible.
But when a small, portable and lightweight language is needed, there's also Sparkling[1], which is like the best ideas of JavaScript with the minimal footprint and portability of Lua.