构建对象: class SortGrid { int indexI; int indexJ; public SortGrid(int x, int y) { indexI = x; indexJ = y; } public int IndexI { get { return indexI; } set { indexI = value; } } public int IndexJ { get { return indexJ; } set { indexJ = value; } } } 编辑排序方…
ES6之前js的对象的属性只能是字符串, <html> <head> <script type="text/javascript"> var a = {1:2} for(let i in a ) { console.log(typeof i) } </script> </head> <body> </body> </html> 虽然在浏览器打印a的时候我们看到的1,但是这里打印i的type出…