Writing my first contract using YouTube courses all around. On the step to create a withdraw function get receive the money back.
Here is the code below. Not sure where I went wrong.
function withdraw() payable public {
msg.sender.transfer(address payable(this).balance);
//Type error send and transfer are only available for objects of type address payable