Improve JS syntax