I'd like to use 2 spaces for my indents instead of 4. I can change the default behavior of C mode using:
(setq c-basic-offset 2)
(setq js-indent-level 2)
should do what you're looking for. If you're using an older version of emacs, you may be in java-mode. I think this mode responds to
c-basic-offset, however I may be wrong.