ES6: Use Destructuring Assignment to Assign Variables from Arrays question on function

There is this code:

let a = 8, b = 6;
(() => {
  "use strict";
  // change code below this line
  // change code above this line
console.log(a); // should be 6
console.log(b); // should be 8

Why we have this function that is calling itself? Why simply not write our code without the function?

It is there because the strict mode needs a scope, can’t be activated globally. To create a local scope here you have a IIFE immediately invoked function expression

Thanks. And what is strict mode?

It is a mode that make sure some errors are explicitated that instead usually are silent , in a learning environment is much useful

Thanks for the answers.