DOM elements :
const html = `<div class="movements__row">...</div>`;
containerMovements.insertAdjacentHTML('afterbegin', html);
containerMovements.innerHTML = '';
font-size:
=> fontSize
{"Note that the development build is not optimized.".split(' ').slice(0, 3).join(' ')} // -> Note that the
function
is hoisted, and therefore we can call/use it before declaring/defining it whereas the const handleSelectMovie
is an arrow function and do not undergo hoisting.const object1 = {
a: 'somestring',
b: 42,
c: false,
d: {
e: false,
f : {
g: {
h: "hello"
}
}
}
};
const keyify = (obj, prefix = '') =>
Object.keys(obj).reduce((res, el) => {
if( Array.isArray(obj[el]) ) {
return res;
} else if( typeof obj[el] === 'object' && obj[el] !== null ) {
return [...res, ...keyify(obj[el],el)];
}
return [...res, prefix ? prefix : null, el].filter(el => el != null);
}, []);
console.log(keyify(object1)) // > Array ["a", "b", "c", "d", "e", "g", "h"]