isValid() {
    const text = this.state.calculationText;
    switch (text.slice(-1)) {
      case "+":
      case "-":
      case "*":
      case "/":
        return false;
    }
    return true;
  }
// check if a tring is valid (the last char is a number)
check if a tring is valid (the last char is a number)
check if a tring is valid ( the last char is a number )
isValid() {
    const text = this.state.calculationText;
    switch (text.slice(-1)) {
      case "+":
      case "-":
      case "*":
      case "/":
        return false;
    }
    return true;
  }
isValid ( ) { const text = this . state . calculationText ; switch ( text . slice ( - 1 ) ) { case "+" : case "-" : case "*" : case "/" : return false ; } return true ; }
check if a tring is valid (the last char is a number)
check if a tring is valid ( the last char is a number )