-
-
Save tikarammardi/024e43d90e09b4123626bc10dac35c8b to your computer and use it in GitHub Desktop.
sub-type error-eg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setWindowSize(size){ | |
let startWindow = 10; | |
let endWindow = 30; | |
if(size > endWindow){ | |
throw new RangeError(` Size ${size} is out of range`); | |
} | |
//do some more coding | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment