What Is The Function Of The Lymph Nodes Why Are They Often Inflamed Or Swollen W

What is the function of the lymph nodes? Why are they often inflamed or swollen when we get sick?