Last active
May 13, 2021 06:09
-
-
Save Otto-Vector/d0367c681e58b10f9351a81e03959b30 to your computer and use it in GitHub Desktop.
trueOf
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
//проверка на присутствие числа в аргументе | |
//если хоть один аргумент в массиве совпадает с числом, возвращает true | |
Number.prototype.trueOf = function(...props) { | |
return props.includes(this) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment