A dishwasher comprising: a main body; a wash tub placed within the main body to receive objects to be washed therein; at least one first nozzle assembly located within the wash tub to wash the objects received in the wash tub, the first nozzle assembly being configured to spray wash water while being rotated, and a detergent box to supply detergent into the wash tub, wherein the first nozzle assembly includes: a main nozzle configured to be rotatable about a rotation axis thereof; a plurality of first injection holes (211a, 215a) provided at the main nozzle to spray the wash water to the objects in the wash tub, a first flow path defined in the main nozzle for movement of wash water to the plurality of first injection holes; at least one sub nozzle provided at the main nozzle, the sub nozzle having a second injection hole to spray the wash water to the detergent box and a second flow path for movement of wash water to the second injection hole; and means for opening or closing the second flow path wherein the means for opening or closing the second flow path is arranged to control spraying of wash water through the sub nozzle based on a position of the main nozzle, in which the second flow path is opened when the sub nozzle is located in a front region of the wash tub to face the detergent box and the second flow path is closed when the sub nozzle is located in a rear region of the wash tub. a main body; a wash tub placed within the main body to receive objects to be washed therein; at least one first nozzle assembly located within the wash tub to wash the objects received in the wash tub, the first nozzle assembly being configured to spray wash water while being rotated, and a detergent box to supply detergent into the wash tub, wherein the first nozzle assembly includes: a main nozzle configured to be rotatable about a rotation axis thereof; a plurality of first injection holes (211a, 215a) provided at the main nozzle to spray the wash water to the objects in the wash tub, a first flow path defined in the main nozzle for movement of wash water to the plurality of first injection holes; at least one sub nozzle provided at the main nozzle, the sub nozzle having a second injection hole to spray the wash water to the detergent box and a second flow path for movement of wash water to the second injection hole; and means for opening or closing the second flow path wherein the means for opening or closing the second flow path is arranged to control spraying of wash water through the sub nozzle based on a position of the main nozzle, in which the second flow path is opened when the sub nozzle is located in a front region of the wash tub to face the detergent box and the second flow path is closed when the sub nozzle is located in a rear region of the wash tub. a main nozzle configured to be rotatable about a rotation axis thereof; a plurality of first injection holes (211a, 215a) provided at the main nozzle to spray the wash water to the objects in the wash tub, a first flow path defined in the main nozzle for movement of wash water to the plurality of first injection holes; at least one sub nozzle provided at the main nozzle, the sub nozzle having a second injection hole to spray the wash water to the detergent box and a second flow path for movement of wash water to the second injection hole; and means for opening or closing the second flow path wherein the means for opening or closing the second flow path is arranged to control spraying of wash water through the sub nozzle based on a position of the main nozzle, in which the second flow path is opened when the sub nozzle is located in a front region of the wash tub to face the detergent box and the second flow path is closed when the sub nozzle is located in a rear region of the wash tub.