The challenge is to determine the length of the longest sequence of consecutive zeros in the binary representation of a given positive integer.The sequence should be surrounded by ones at both ends.Developers are encouraged to write a JavaScript function to solve this challenge.The challenge difficulty is medium.