For this Question: Create a function called <code>createCounter</code> that takes in <code>a number</code> (initialValue) as an argument and returns an object with two methods: <code>increment</code> and <code>decrement</code>. 
<ul>
<li>The <code>increment</code> method should <code>increment the number by 1</code> and return the updated value. </li>
<li>The <code>decrement</code> method should <code>decrement the number by 1</code> and return the updated value. </li>
</ul>
On calling the <code>increment</code> and <code>decrement</code> methods at various times, the operations should be on the <code>initialValue</code> and the initialValue should be updated and stored so that the next time any of these methods is called the operation is on the updated value and that updated value is stored as well. Use <code>closure</code> to complete this task.The <code>createCounter</code> function takes a <code>number</code> as an argumentThe <code>createCounter</code> function should return an <code>object</code>.
Inside the object, both <code>increment</code> and <code>decrement</code> methods should return a <code>number</code>.const counter = createCounter(5);

console.log(counter.increment()); // prints 6
console.log(counter.increment()); // prints 7
console.log(counter.decrement()); // prints 6, I have written this Solution Code: function createCounter(initialValue) {
  let count = initialValue;
  
  return {
    increment: function() {
      count++;
      return count;
    },
    decrement: function() {
      count--;
      return count;
    }
  };
}, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?