I think your definition is off. Js was never for "code". The code itself is just a means to a goal. That certain things better can be achieved without js is good.
Microwave ovens were never for heating food. The warming is just a means to a dinner.
Better analogy would be "Microwave ovens were never for injecting electromagnetic waves into food. The electromagnetic waves were just a means to heat the food".