Checkbox: Billing to Shipping

Hey all, old man trying his had at some coding on Wix. I have been trying to get this checkbox to function for two days now. Total newb at this stuff and no schooling so I’m just trying to understand posts that have been made but that not’s not going well. Any help getting this done would be greatly appreciated. Thanks!

Here is the code I have for the page. My Editor page for my site is; https://editor.wix.com/html/editor/web/renderer/edit/52e82fb2-2792-4ab3-9df1-7d1f062aaa63?metaSiteId=54eb33a6-73b7-43fc-8224-5ade03128a90

export function checkbox1_click ( event ) {
if ( $w ( “#checkbox1” ). checked ) {
$w ( “#loginPassword” ). inputType = “text” ;
} else {
$w ( “#loginPassword” ). inputType = “password” ;
}
}

< script >
function billingFunction ( ) {
var BFN = document . getElementById ( “billFName” );
var SFN = document . getElementById ( “shipFName” );
var BLN = document . getElementById ( “billLName” );
var SLN = document . getElementById ( “shipLName” );
var BS1 = document . getElementById ( “billStreet” );
var SS1 = document . getElementById ( “shipStreet” );
var BS2 = document . getElementById ( “billStreet2” );
var SS2 = document . getElementById ( “shipStreet2” );
var BC = document . getElementById ( “billCity” );
var SC = document . getElementById ( “shipCity” );
var BS = document . getElementById ( “billState” );
var SS = document . getElementById ( “shipState” );
var BZC = document . getElementById ( “billZipCode” );
var SZC = document . getElementById ( “shipZipCode” );
var OE = document . getElementById ( “officeEmail” );
var LE = document . getElementById ( “logInEmail” );

if ( checkbox2 . checked == true ) {
SFN . value = BFN . value ;
SLN . value = BLN . value ;
SS1 . value = BS1 . value ;
SS2 . value = BS2 . value ;
SC . value = BC . value ;
SS . value = BS . value ;
SZC . value = BZC . value ;
LE . value = OE . value ;
} else {
SFN . value = “” ;
SLN . value = “” ;
SS1 . value = “” ;
SS2 . value = “” ;
SC . value = “” ;
SS . value = “” ;
SZC . value = “” ;
}
}
}
</ script >

Hope someone is able to help me.