1. Use
of Object.keys
Array of keys in the output object whose value is greater than 2
var data = {a: 1, b: 2, c: 3, d: 4};
Object.keys(data).filter(function(x) { return
1 ;})
Expected output: ["c","d"]
Please fill in what
?
Correct answer: 1 : data[x]>2
This is a new syntax for Es5.
const keys = Object. keys (options); //Only get the attribute key of the json object, and return an array that stores all the keys.