i am watching a tutorial and teacher refactor below code
function profile (props){
let info = props.info
//...............
}
then he refactor it like
function profile ({info}){
//let info = props.info (delete this line)
//...............
}
I know basic of destructuring and according to my understanding it should be done like this
function profile (props){
let{ info} = props
//...............
}
but he is passing {info } directly as parameter ,i still unable to understand above code so can any one explain me it.