Ad
  • Custom User Avatar

    the === is used in JS to compare values and data types, because == does the type conversion before comparing (you can try to compare 2 and "2" with == and then with === and if i am not mistaken both of these will give you different answer

    ? : is a ternary operator, you can think of it as shorthand for if/else statement
    ? condition is true : condition is false
    i recommend using ternary operator only with simple if/else statements and i do not recommend nesting ternary operator, i believe you can find some videos about use cases of ternary op. on YT

    if you have more questions feel free to message me, i am happy to help