Upvote:2
If you are leaving to Canada or Mexico, you can use automatic revalidation and re-enter on the same duration of stay you got the first time (and your visa doesn't even have to remain valid during this time). If you are leaving to somewhere else, then when you come back, it will be a new entry on B2, so your visa will need to be valid at that time, and you will get a new duration of stay.