MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / checkNum

Function checkNum

assets/js/Sci_Cal.js:58–70  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

56}
57
58function checkNum(str) {
59 for (var i = 0; i < str.length; i++) {
60 var ch = str.charAt(i);
61 if (ch < "0" || ch > "9") {
62 if (ch != "/" && ch != "*" && ch != "+" && ch != "-" && ch != "."
63 && ch != "(" && ch!= ")" && ch != "%") {
64 alert("invalid entry!")
65 return false
66 }
67 }
68 }
69 return true
70}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected