Last blogpost we used the SharePoint Designer DataSource to get subsites of a SharePoint 2010 site. Good thing about that method is you don’t need code.
If you want to do it in code, so you can do something extra with them, here is how to:
var currentsite = new SP.ClientContext.get_current(); this.webs = currentsite.get_web().get_webs();