src/App.js
// check Duplicated value and save them to the "checkedData" global
check Duplicated value and save them to the "checkedData" global
check Duplicated value and save them to the " checkedData " global
checkDuplicatedValue(data, value, row, col) {
    for (let i = 0; i < 9; i ++) { 
      if (data[row][i] == value && i != col) {
        this.checkedData[row][i] = true;
       }
    }
    for (let i = 0; i < 9; i ++) {
      if (data[i][col] == value && i != row) {
        this.checkedData[i][col] = true;
      }
    }
    let colIndex = parseInt(col / 3);
    let rowIndex = parseInt(row / 3);
    for (let i = rowIndex * 3; i < rowIndex * 3 + 3 ; i ++) {
      for (let j = colIndex * 3; j < colIndex * 3 + 3 ; j ++) {
        if (data[i][j] == value && i != row && j != col ) {
           this.checkedData[i][j] = true;
        }
      }
    }
  }
checkDuplicatedValue ( data , value , row , col ) { for ( let i = 0 ; i < 9 ; i ++ ) { if ( data [ row ] [ i ] == value && i != col ) { this . checkedData [ row ] [ i ] = true ; } } for ( let i = 0 ; i < 9 ; i ++ ) { if ( data [ i ] [ col ] == value && i != row ) { this . checkedData [ i ] [ col ] = true ; } } let colIndex = parseInt ( col / 3 ) ; let rowIndex = parseInt ( row / 3 ) ; for ( let i = rowIndex * 3 ; i < rowIndex * 3 + 3 ; i ++ ) { for ( let j = colIndex * 3 ; j < colIndex * 3 + 3 ; j ++ ) { if ( data [ i ] [ j ] == value && i != row && j != col ) { this . checkedData [ i ] [ j ] = true ; } } } }
check Duplicated value and save them to the "checkedData" global
check Duplicated value and save them to the " checkedData " global