The written form of variables in the js object

var data = { this.tableData,ths.observerValue } // 

const { tableData,observerValue } = this
var data = { tableData,observerValue } // ok

is there any other way besides structure?


the error is reported because the concise representation of attributes is used by default

const baz = {foo};
// 
const baz = {foo: foo};

var data = {
            tableData: this.tableData,
            observerValue: this.observerValue
}
// 

ES6 allows you to write variables directly in an object. At this point, the attribute name is the variable name and the attribute value is the value of the variable.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea2233-4798a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea2233-4798a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?