That doesn't make any sense. You can do those sorts of terrible things with any language. There are way better reasons for hating Javascript.
I think the negative reaction is more due to the fact that it doesn't seem to be a well thought-out opinion. There are all sorts of bad things you can say about JavaScript, but I'm not sure that "It permits code obfuscation" makes sense to include on the list.
This can be done in any dynamic language, especially languages that allow `eval` or similar.
Edit: I was right, it is not a popular opinion and therefore not a valuable one. Let the downvotes rain.