var MSG={
process_success :{
code:200,msg:"Success"},
service_unavailable :{
code:5031001,msg:"Server exception"},
wrong_url : {
code:4041001,msg:"Wrong url"},
}
How to get the code:
for(var e in MSG){
console.log(MSG[e].code)
}
I didn’t touch the front end for half a year, and I forgot the basic skills. I cried.