rating = 67;
console.log(
(1 / rating).toFixed(2) <= 0.01 ? (1 / rating).toFixed(3) : (1 / rating).toFixed(2),
(1 / rating).toFixed(rating > 66 ? 3 : 2)
);
rating = 66;
console.log(
(1 / rating).toFixed(2) <= 0.01 ? (1 / rating).toFixed(3) : (1 / rating).toFixed(2),
(1 / rating).toFixed(rating > 66 ? 3 : 2)
);
- <Figure type="circle"/>
- <Figure type="square"/>
- <Figure type="triangle"/>
+ <Figure type="circle" change={() => this.change('circle')}/>
+ <Figure type="square" change={() => this.change('square')}/>
+ <Figure type="triangle" change={() => this.change('triangle')}/>