“返回”关键字在“for每一项”功能中的含义是什么?
$('button').click(function () { [1, 2, 3, 4, 5].forEach(function (n) { if (n == 3) { // it should break out here and doesn't alert anything after return false } alert(n) })})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><button>Click me</button>
return
白板的微信
慕姐4208626
相关分类