I have a condition in reactjs that starts with
+this.state.isCompleted
Why do we write + ?
I have a condition in reactjs that starts with
+this.state.isCompleted
Why do we write + ?
 
    
    Is a forced conversion to number
const str = '1'
const bool = false
const fail = 'isNan?'
const num = +str
const numBool = +bool
const numFail = +fail
console.log(typeof num, typeof numBool, numFail)