I remember this saying originating as a riff on The Art of War, but I have no evidence of that
The Art of JavaScript sure does sound more exotic than The Practice of JavaScript, so I can see why a translator would make that choice.
The word itself comes from Latin "ars," meaning a skill, a craft.