Avoid nested if... else... condition by using Object method in javascript #shorts

Published --