Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

lodash function to reset a number

$
0
0

Is there a lodash function that does the following:

function myFunc(prev: number) {  let next = prev + 1  if (next > THRESHOLD) {    next = INITIAL_VALUE  }  return next}

Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>