const investments = { 'stock': 2500, 'bond': 1000, 'realEstate': 3000, 'crypto': 500 }; function calculateTotalInvestment() { const total = Object.values(investments).reduce((sum, value) => sum + value, 0); return total; } function updateInvestment(amount, category) { if (category in investments) { investments[category] += amount; } } function displayInvestments() { console.log("Current Investments:"); console.log(`Stock: $${investments.stock}`); console.log(`Bond: $${investments.bond}`); console.log(`Real Estate: $${investments.realEstate}`); console.log(`Crypto: $${investments.crypto}`); console.log("\nTotal Investment Value: $${calculateTotalInvestment()}"); } // Example usage displayInvestments(); updateInvestment(500, 'stock'); displayInvestments();