Which of the following correctly describes the function of restriction enzymes?
(A) It links together two pieces of DNA.
(B) It cuts DNA at specific locations.
(C) It removes nucleotides only from the ends of the DNA.
(D) It catalyzes the synthesis of DNA.