function countTrailingZeros(n: number): number {
let binaryStr: string = n.toString(2); // Convert to binary string
let trimmedStr: string = binaryStr.replace(/0+$/, ''); // Remove trailing zeros
return binaryStr.length - trimmedStr.length;
}
let n: number = 80; // binary: 1010000
console.log("Number of Trailing Zeros:", countTrailingZeros(n));
/*
run:
"Number of Trailing Zeros:", 4
*/