A. The conventional wisdom is to save an emergency fund that could cover at least 3-6 months' living expenses. Until you hit that goal, investing should not be your top priority, but it is important to save enough to your 401(k) so you can get the employer's match.
To balance the two goals, hold some less risky assets in your 401(k) so if you are forced to cash out a 401(k) as a last resort, you have some safe money there to do it.