Find if the given number is present in the infinite sequence or not | Function that returns true if the sequence will contain B ; Driver Code
function doesContainB ( a , b , c ) { if ( a == b ) { return true ; } if ( ( b - a ) * c > 0 && ( b - a ) % c == 0 ) { return true ; } return false ; } let a = 1 , b = 7 , c = 3 ; if ( doesContainB ( a , b , c ) ) { document . write ( " " ) ; } else { document . write ( " " ) ; }