0

I have a question about javascript objects. I have this object and I need a function to find if for example 3 belongs to c in this object or 4 belongs to d in this object. Is there a way to find this?

let obj = {a:1, b:2, c:3, d:4};

Or for example this object. How to find if Sushi belongs to Japan and not to USA in this object?

const obj2 = { Italy:'Pizza', Japan:'Sushi', USA:'Hamburger' };
Vojta Simek
  • 23
  • 1
  • 3

0 Answers0