* @param {Object} bucket
* @param {Object} products
*
* @returns {number}
*/
function calculateCost(bucket, products) {
let result = 0;
for(let i = 0; i < bucket.length; i++) {
result += bucket[i] * products[i]
}return result
}
const buckets = {voiceAssistants: 410, thermostats: 93, lighting: 1300};
const prices = {voiceAssistants: '9.99$', thermostats: '74.99$', lighting: '49.50$'};
const totals = Object.keys(prices).reduce((acc, c) => acc + buckets[c] * parseFloat(prices[c]), 0);
// всё равно не то что-то: 75419.97