function closeIf(e){
    
    const modal = document.querySelector('.modal')
    const pModal = document.querySelector('.p-modal')
    if (e.target !== modal && e.target !== pModal) {
    modal.style.display = "none" 
    document.body.style.background = ''  
       
    }

    
}
//Create a function to close the modal
Create a function to close the modal
Create a function to close the modal
function closeIf(e){
    const modal = document.querySelector('.modal')
    const pModal = document.querySelector('.p-modal')
    if (e.target !== modal && e.target !== pModal) {
    modal.style.display = "none" 
    document.body.style.background = ''  
    }
}
function closeIf ( e ) { const modal = document . querySelector ( '.modal' ) const pModal = document . querySelector ( '.p-modal' ) if ( e . target !== modal && e . target !== pModal ) { modal . style . display = "none" document . body . style . background = '' } }
Create a function to close the modal
Create a function to close the modal