do {} while ... 和while ... {} 175 次浏览 do while可以保证至少执行一次,而while语句可能一次也不执行。 Swift不用do while, 而是用repeat while,和do while是相同含义。