jeudi 9 juillet 2020

Convert Javascript Ternary Function to simple function

I have a ternary function

const resetCompletion = completed < 0 ? 0 : completed > 100 ? 100 : completed;

I need to convert it into a simple function of if else if else block. What should be the proper way?

Aucun commentaire:

Enregistrer un commentaire