For this Question: Complete the function <code>solve</code> which takes <code>obj</code> as a parameter which is an <code>object</code>.

Iterate <code>obj</code> using a <code>for of</code> and a <code>for in</code> loop. The <code>for...of</code> loop should print all the <code>values</code> of the <code>obj</code> in the console and the <code>for...in</code> loop should print the <code>key</code> and <code>values</code> of <code>obj</code> in the format <code>{key}: {value}</code>.
See the example for more clarity.

Note: Generate Expected Output section will not work for this questionInput will have the object which is passed as a parameter to the function solve

You need not worry about the same, it is handled properly by the hidden pre-function code.

Example:
{"name": "John","age": "32","location": "New York"}The <code>for of</code> loop should print all the <code>values</code> of the <code>obj</code> object in the console 
The <code>for in</code> loop should print the <code>key</code> and <code>values</code> of <code>obj</code> object in the format <code>{key}: {value}</code>const obj = {"name": "John","age": "32","location": "New York"}
solve(obj)

/*
The console output should be
John
32
New York
name: John
age: 32
location: New York
*/, I have written this Solution Code: function solve(obj){
   for (const value of Object.values(obj)) {
      console.log(value);
  }

 for (const key in obj) {
   console.log(`${key}: ${obj[key]}`);
 }
}, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?