var obj = { foo: 1,
bar: null,
baz: undefined
}
function objectToPairs(obj){
var arr = [];
var objKeys = Object.keys(obj);
for (var i = 0; i < objKeys.length ; i++) {
arr.push(objKeys[i]);
arr.push(obj[objKeys[i]]);
}
return arr;
}
objectToPairs(obj);
var obj = { foo: 1,
bar: null,
baz: undefined
}
objectSplit(obj);
function objectSplit(obj){
var arr1 = [];
var arr2 = [];
var objKeys = Object.keys(obj);
for (var i = 0; i < objKeys.length; i++) {
arr1.push(objKeys[i]);
arr2.push(obj[objKeys[i]]);
}
var resObject = {};
resObject.keys = arr1;
resObject.values = arr2;
return resObject;
}
http://homework.pavelefimen95.fe.a-level.com.ua/module/setPropertyBySelector
http://homework.pavelefimen95.fe.a-level.com.ua/module/scrollButtons
http://homework.pavelefimen95.fe.a-level.com.ua/module/tableEditor