America existed for more than 160 years before chocolate-chip cookies did.
There were cookies, yes—the first written recipe for an American cookie was published in 1796 in the book American Cookery and called for boiled sugar (to separate the scummy impurities) and powdered coriander. The machine that made Fig Newtons was invented in 1891. Fannie Farmer's 1896 Boston Cooking-School Cook Book included a recipe for oatmeal-raisin cookies. By the first decade of the 20th century, brownies (which are, technically, a type of bar cookie) were being baked.
But no one had taken cookie dough and folded in chunks of chocolate. Any time chocolate went into cookies, it was melted first.
It was Ruth Wakefield who changed that. The proprietor of the Toll House restaurant in Whitman, Mass., Wakefield was good at desserts. As Carolyn Wyman writes in The Great American Chocolate Chip Cookie Book, the Toll House restaurant had a menu just for desserts, and those desserts had a celebrity following. (Joseph Kennedy, Sr., Wyman writes, would order Toll House brownies for his kids. Duncan Hines liked the lemon meringue pie.)
In 1938, Ruth Wakefield added pieces of a chopped up Nestle bar to cookies she planned on serving with ice cream. Food editors picked up on the idea, and the recipe started circulating through the press and gaining huge popularity. In 1939, Wakefield gave Nestle permission to print her recipe on the back of its chocolate bars. And from then on America had chocolate-chip cookies.