Write a function for encoding USPS Intelligent Mail Barcodes (IMBs)

`function encode(barcode){ let string = barcode.toString(); let barcodeArray = string.split(""); let encodedArray = [] let sum = 0; let checksum = 0; let sumOfCheck = 0; let finalCheck = 0; let encodedCheck = 0; let finalBarcode = ""; let unencodedBarcode = ""; let encodedBarcode = ""; let arrCheck = 0; let codeArr = ["||:::", ":::||", "::|:|", "::||:", ":|::|", ":|:|:", ":||::", "|:::|", "|::|:", "|:|::"] if(barcode.length != 5){ return "Please enter a 5 digit barcode" } for(let i = 0; i < barcodeArray.length; i++){ sum += parseInt(barcodeArray[i]) unencoded`