Const creates a readonly reference to a value, i.e values assigned to a const variable cannot be reassigned. But Wait… there is a catch here ! Now, what we read above holds true for primitive datatypes i.e string, number, boolean, null, undefined but this is not the case with non-primitive datatypes such as objects and arrays. Let us…