Advertisement
kolton

Untitled

May 16th, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. Unit.prototype.getPrefix = function (id) {
  2. if (typeof this.prefixnum === "number") {
  3. return this.prefixnum === id;
  4. }
  5.  
  6. var i,
  7. prefixList = this.prefixnum;
  8.  
  9. for (i = 0; i < prefixList.length; i += 1) {
  10. if (id === prefixList[i]) {
  11. return true;
  12. }
  13. }
  14.  
  15. return false;
  16. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement