Trying to compare 2 values ββof integers, X and Y. If X is greater than Y, I want to disable X in Y, like this -
if(x>y) { x=y; }
Is there a shorthand way to do this (either in pure JavaScript or in jQuery)? I was thinking of using a custom function, but wanted to see if something already exists.
Thanks!
source share