check if a character is an operator javascript code example
Example 1: c check if char is an operator
char o = '+'; //Or some other character
if (o == '%' || o == '/' || o == '*' || o == '+' || o == '-') {
//Do something
//...
}
Example 2: check if something is a letter in js
string.charAt(1).toUpperCase() !== string.charAt(1).toLowerCase()