Untitled

mail@pastecode.io avatar
unknown
javascript
a year ago
668 B
1
Indexable
Never
<script>
        test("marg")

        function test(number) {
            if (!number) {
                alert("hichi nist")
                return
            }

            if (number.toString()[0] > 7 && (!number.toString()[1])) {
                alert("okeye")
            } else {
                if (number.toString()[0] == 1 && (number.toString()[1] >= 0 && number.toString()[1] <= 9)) {
                    alert("okeye")
                } else if (number.toString()[0] == 2 && number.toString()[1] == 0) {
                    alert("okeye")
                } else {
                    alert("error 2")
                }
            }
        }
    </script>