I'm refactoring some piece of code:
with (form.proxy_settings) {
PutValue("Usage", 1);
PutValue("Server", 2);
PutValue("ServerPort", 3);
PutValue("Login", 3);
}
I want to remove with
. Should I do like that?
(function() {
ps.PutValue("Usage", 1);
ps.PutValue("Server", 2);
ps.PutValue("ServerPort", 3);
ps.PutValue("Login", 3);
}(form.proxy_settings);
Or is it better in this particular case to simply add form.proxy_settings
to where it is required?