I'm wondering what curly brackets do inside a function.
I was checking lazy() which is one of function in React library, and found code like this:
function lazy(x) {
var payload = {//some values};
var lazyType = {//some values};
{ // ???
var defaultProps;
var proptype;
Object.defineProperties(lazyType, {
defaultProps: {//codes}
},
propTypes: {//codes}
});
} // ???
return lazyType;
}
I'm not sure how those curly brackets work or mean.. please help me to understand, thank you