var j = {0: "Hello", 1: " ", 2: "World", 3: "!"};
console.log(Object.values(j))
// Object.values(j) = ["Hello"," ","World","!"]
const responseTypes = {
json: 'application/json',
text: 'text/*',
formData: 'multipart/form-data',
arrayBuffer: '*/*',
blob: '*/*'
};
console.log(Object.entries(responseTypes));
/*[each of the json key value becomes an array ]*/
function list() {
return Array.prototype.slice.call(arguments)
}
let list1 = list({0:"zero"}, {1:"one"}, {2:"two"}) //[ { '0': 'zero' }, { '1': 'one' }, { '2': 'two' } ]
console.log(list1);
let list2 = list({0:{z:"zero"}, 1:{o:"one"}});
console.log(list2) //[ { '0': { z: 'zero' }, '1': { o: 'one' } } ]