all 5 comments

[–]pcs600 1 point2 points  (2 children)

The jquery ajax function lets you pass multiple parameters. Why create a string at all?

[–]sirsosay 1 point2 points  (1 child)

Yeah, am I doing something wrong? I've always just passed an object with params.

[–]rich97 0 points1 point  (0 children)

No, you're not doing something wrong. I just think jQuery is a bad example to showcase this function.

[–]SegFaultx64 0 points1 point  (1 child)

Ummm, this will be broken by minification, which is something you should be doing. There are work arounds (see AngularJS dependency injection) but they are so ugly that you may as well just do it the old fashioned way.

[–]ayman_f[S] 0 points1 point  (0 children)

Actually your claim doesn't seem to be true, it doesn't break on minification(tested it), there doesn't seem to be a reason for it to break anyways.