阵列状态将缓存在iOS 12 Safari中。它是错误还是功能?
更新于2018.10.31 此错误已在iOS 12.1中修复,祝您愉快! 我在新发布的iOS 12 Safari中发现数组的值状态存在问题,例如,如下代码: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <title>iOS 12 Safari bugs</title> <script type="text/javascript"> window.addEventListener("load", function () { let arr = [1, 2, 3, 4, 5]; alert(arr.join()); document.querySelector("button").addEventListener("click", function () { arr.reverse(); }); }); </script> </head> <body> <button>Array.reverse()</button> <p style="color:red;">test: …