Rotations of a Binary String with Odd Value | function to calculate total odd decimal equivalent ; Driver code
function oddEquivalent ( s , n ) { var count = 0 ; for ( var i = 0 ; i < n ; i ++ ) { if ( s [ i ] == ' ' ) count ++ ; } return count ; } var s = " " ; var n = s . length ; document . write ( oddEquivalent ( s , n ) ) ;