var warehouseData=[ { "WarehouseId":1, "ThirdParyId":301, "WarehouseName":"香港", "WarehouseType":"海外仓库", "WarehouseDesc":"小仓库", }, { "WarehouseId":2, "ThirdParyId":302, "WarehouseName":"深圳", "WarehouseType":"本地仓库", "WarehouseDesc":"大仓库", }, ]
This is the data in the warehouse. Now I want to edit and modify one of the data. I just wrote a function, as follows:
UpdateWarehouse(obj, callback) { for(var i=0;i
It doesn’t work when called. Could you please tell me if it’s wrong to write it like this?
There is a problem with the data format. Do not add a comma to the last item of the object
I don’t see any grammatical problems in the code. Are you sure it’s not used incorrectly?
Is there a missing word
function
in front of this function?Then remove the comma, try it