Một cách đặt và gán giá trị trong mảng, object cự ngắn gọn (ok)
var test = {
"record": {
"text1": {
"value1": "45451"
},
"text2": {
"value2": "45454"
}
}
}
const { record: { text1: {value1}, text2: {value2} } } = test;
console.log(value1);
console.log(value2);
Kết quả:
test.js:12 45451
test.js:13 45454
PreviousSử dụng Object.assign và để copy dữ liệu, edit, input, form (ok)Next[LAZY] jQuery.Lazy và tạo background-loading cực chất (ok)
Last updated
Was this helpful?