Find kth smallest number in range [ 1 , n ] when all the odd numbers are deleted | Function to return the kth smallest element from the range [ 1 , n ] after removing all the odd elements ; Driver code
function kthSmallest ( n , k ) { return ( 2 * k ) ; } var n = 8 , k = 4 ; document . write ( kthSmallest ( n , k ) ) ;