The Writing of js function

problem description

when you look at the project code, you can also find that some of the statements in the function are wrapped in curly braces, but there seems to be no difference when you execute them. What"s the use of this?

function a(){
    console.log("<<<<");

    {
        let b = "123";
        console.log(b);
    }

    console.log(">>>");
}

//

<<<<
123
>>>
May.18,2022

isolation scope
  

this is giving the let variable a separate scope

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ed24-4f0aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ed24-4f0aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?