18_object_change.js 468 B

1234567891011121314151617181920212223
  1. let computer = {
  2. processorType: 'AMD Ryzen Threadripper PRO 5975WX',
  3. ram: 128,
  4. graphicsAdapter: 'NVIDIA GeForce RTX 3090',
  5. storage: '1000',
  6. os: 'Windows 11 Pro'
  7. }
  8. computer.processorType = 'Intel Core i7-11700KF';
  9. computer['ram'] = 64;
  10. console.log(computer);
  11. /* ->
  12. *
  13. * {
  14. "processorType": "Intel Core i7-11700KF",
  15. "ram": 64,
  16. "graphicsAdapter": "NVIDIA GeForce RTX 3090",
  17. "storage": "1000",
  18. "os": "Windows 11 Pro"
  19. }
  20. *
  21. * */