code. Then create the functions, getfoodGroupX(), for each of the 4 group. A variable, repeat, allows any 1-4 food items to be randomly selected from each food group. In the
place the code to generate the Day and Meal headings and print out the particular food items for each day/meal that correspond with the predetermined 6/10 Diet (6 meals per day for 10 days). Here is how to end a multi-line JavaScript comment: */ //Functions for each of the four food groups - A, B, C and D function getfoodGroupA() { var fgA = ['Oranges', 'Grapes', 'Apples', 'Peaches', 'Pears', 'Strawberries', 'Papaya', 'HoneydewMelon', 'Kiwi', 'Tangerines', 'Pineapple', 'Prunes', 'Blueberries', 'Cantaloupe', 'Apricots', 'Prunes', 'Plums', 'Figs', 'Grapefruit', 'Raspberries', 'Mango', 'Lemons', 'Blackberries', 'Pomegranates', 'Limes', 'Blackberries', 'Cherries', 'Oranges', 'Grapes', 'Apples', 'Peaches', 'Apples', 'Papaya', 'Grapes', 'Oranges', 'Strawberries', 'Grapefruit', 'Pears', 'Peaches', 'Grapes', 'HoneydewMelon', 'Oranges', 'Grapes', 'Apples', 'Prunes', 'Peaches', 'Apples', 'Grapes', 'Grapefruit', 'Pears', 'Strawberries', 'Apples', 'Prunes', 'Oranges', 'Grapes', 'Peaches', 'Apples', 'HoneydewMelon', 'Grapefruit', 'Pears', 'Papaya', 'Grapes', 'Apples', 'Prunes', 'Oranges', 'HoneydewMelon', 'Apricots', 'Apples', 'Strawberries', 'Grapefruit', 'Blackberries', 'Papaya', 'Grapes', 'Apples', 'Apricots', 'Strawberries', 'Grapefruit', 'Apples', 'Papaya', 'Grapes', 'Apples', 'Blackberries', 'Prunes', 'Apples', 'Raspberries', 'Grapes', 'Grapefruit', 'Papaya', 'Apples', 'Pears', 'Apricots', 'Grapes', 'Papaya', 'Grapes', 'Apples', 'Prunes', 'Oranges', 'Pineapple', 'HoneydewMelon', 'Strawberries', ]; for (var i = 0; i < repeat; i++){ var pick = Math.floor(Math.random()*(100)); var fgA_out = fgA[pick]; document.write(' '+ fgA_out + ', '); }; return; }; function getfoodGroupB() { var fgB = ['Lobster', 'SeaBass', 'Catfish', 'Cod', 'NavyBeans', 'GarbanzoBeans', 'Trout', 'Crab', 'Crayfish', 'BakedBeans', 'PintoBeans', 'Peanuts', 'Walnuts', 'Almonds', 'BrazilNuts', 'Cashews', 'PistachioNuts', 'Hazelnuts', 'MacadamiaNuts', 'RedSnapper', 'CottageCheese', 'BaconStrips', 'SausageLinks', 'PastramiSlices', 'HamSlices', 'TurkeySlices', 'RoastBeefSlices', 'Shrimp', 'Flounder', 'Chicken', 'TunaSalad', 'Salmon', 'Mackerel', 'CheeseSlices', 'ScrambledEggs', 'HardboiledEggs', 'Lentils', 'EggSalad', 'CottageCheese', 'MacadamiaNuts', 'BakedBeans', 'Chicken', 'TunaSalad', 'CottageCheese', 'HamSlices', 'TurkeySlices', 'RoastBeefSlices', 'Shrimp', 'CottageCheese', 'Walnuts', 'MacadamiaNuts', 'Cashews', 'BakedBeans', 'CheeseSlices', 'ScrambledEggs', 'HardboiledEggs', 'Lentils', 'EggSalad', 'Cashews', 'NavyBeans', 'Chicken', 'TunaSalad', 'PintoBeans', 'HamSlices', 'TurkeySlices', 'RoastBeefSlices', 'Shrimp', 'CottageCheese', 'CheeseSlices', 'ScrambledEggs', 'HardboiledEggs', 'Lentils', 'EggSalad', 'Cashews', 'NavyBeans', 'Chicken', 'TunaSalad', 'CottageCheese', 'MacadamiaNuts', 'BakedBeans', 'CottageCheese', 'HamSlices', 'TurkeySlices', 'RoastBeefSlices', 'Shrimp', 'Chicken', 'TunaSalad', 'MacadamiaNuts', 'Cashews', 'BaconStrips', 'PintoBeans', 'NavyBeans', 'MacadamiaNuts', 'BakedBeans', 'CottageCheese', 'HamSlices', 'TurkeySlices', 'RoastBeefSlices', 'Shrimp', 'Chicken', ]; for (var i = 0; i < repeat; i++){ var pick = Math.floor(Math.random()*(100)); var fgB_out = fgB[pick]; document.write(' '+ fgB_out + ', '); }; return; }; function getfoodGroupC() { var fgC = ['Lettuce', 'Tomatoes', 'Cucumber', 'Squash', 'Eggplant', 'Zucchini', 'Peppers', 'Garlic', 'Mushrooms', 'Pickles', 'GreenBeans', 'StringBeans', 'Beets', 'Peas', 'Radishes', 'Spinach', 'BrusselsSprouts', 'Cabbage', 'Broccoli', 'Celery', 'Artichokes', 'LimaBeans', 'Asparagus', 'Cauliflower', 'Onions', 'Parsley', 'Turnips', 'Parsnips', 'Mushrooms', 'Pickles', 'GreenBeans', 'StringBeans', 'Beets', 'Peas', 'Radishes', 'Spinach', 'Cucumber', 'Squash', 'Eggplant', 'Zucchini', 'Peppers', 'LimaBeans', 'Asparagus', 'Cauliflower', 'Onions', 'Spinach', 'Mushrooms', 'Pickles', 'GreenBeans', 'StringBeans', 'Beets', 'Peas', 'Radishes', 'Spinach', 'Lettuce', 'Tomatoes', 'Cucumber', 'Squash', 'Eggplant', 'Zucchini', 'Peppers', 'LimaBeans', 'Asparagus', 'Cauliflower', 'Onions', 'Cabbage', 'Broccoli', 'Celery', 'GreenBeans', 'Mushrooms', 'Pickles', 'GreenBeans', 'StringBeans', 'Beets', 'Peas', 'Radishes', 'Spinach', 'Lettuce', 'Tomatoes', 'BrusselsSprouts', 'Cabbage', 'Broccoli', 'Celery', 'GreenBeans', 'LimaBeans', 'Asparagus', 'Cauliflower', 'Onions', 'LimaBeans', 'Asparagus', 'Cauliflower', 'Onions', 'Pickles', 'GreenBeans', 'StringBeans', 'Beets', 'Peas', 'Spinach', 'Squash', 'Eggplant', ]; for (var i = 0; i < repeat; i++){ var pick = Math.floor(Math.random()*(100)); var fgC_out = fgC[pick]; document.write(' '+ fgC_out + ', '); }; return; }; function getfoodGroupD() { var fgD = ['Lobster', 'SeaBass', 'Catfish', 'Cod', 'NavyBeans', 'GarbanzoBeans', 'Trout', 'Crab', 'Crayfish', 'Almonds', 'BrazilNuts', 'Cashews', 'PistachioNuts', 'BakedBeans', 'PintoBeans', 'Peanuts', 'Walnuts', 'Hazelnuts', 'MacadamiaNuts', 'Lettuce', 'Tomatoes', 'Cucumber', 'Squash', 'Eggplant', 'Zucchini', 'Peppers', 'Garlic', 'Mushrooms', 'Pickles', 'GreenBeans', 'StringBeans', 'Oranges', 'Grapes', 'Apples', 'Peaches', 'Pears', 'Strawberries', 'Swordfish', 'Chicken', 'TunaSalad', 'Papaya', 'Honeydew', 'Kiwi', 'Tangerines', 'Pineapple', 'Blueberries', 'Cantaloupe', 'Apricots', 'Prunes', 'Plums', 'Figs', 'Grapefruit', 'Limes', 'Blackberries', 'Cherries', 'CottageCheese', 'BaconStrips', 'SausageLinks', 'PastramiSlices', 'Raspberries', 'Beets', 'Peas', 'Pomegranates', 'HamSlices', 'Turkey Slices', 'RoastBeefSlices', 'Shrimp', 'Flounder', 'Salmon', 'Mackerel', 'CheeseSlices', 'Cauliflower', 'Onions', 'Parsley', 'Turnips', 'Spinach', 'BrusselsSprouts', 'Cabbage', 'Broccoli', 'Celery', 'Artichokes', 'LimaBeans', 'Asparagus', 'RedSnapper', 'ScrambledEggs', 'HardboiledEggs', 'Lentils', 'EggSalad', 'Mango', 'Lemons', 'Nectarines', 'Radishes', 'Almonds', 'BrazilNuts', 'Cashews', 'PistachioNuts', 'BakedBeans', 'PintoBeans', 'Peanuts', 'Cauliflower', ]; for (var i = 0; i < repeat; i++){ var pick = Math.floor(Math.random()*(100)); var fgD_out = fgD[pick]; document.write(' '+ fgD_out + ', '); }; return; }; // end of JavaScript functions -->