Check if mirror image of a number is same if displayed in seven segment display | Return " Yes " , if the mirror image of number is same as the given number Else return " No " ; Checking if the number contain only 0 , 1 , 8. ; Checking if the number is palindrome or not . ; If corresponding index is not equal . ; Driver code
function checkEqual ( S ) { for ( var i = 0 ; i < S . length ; i ++ ) { if ( S [ i ] != ' ' && S [ i ] != ' ' && S [ i ] != ' ' ) { return " " ; } } var start = 0 , end = S . length - 1 ; while ( start < end ) { if ( S [ start ] != S [ end ] ) { return " " ; } start ++ ; end -- ; } return " " ; } var S = " " ; document . write ( checkEqual ( S ) ) ;