Advertisement
Guest User

Untitled

a guest
Dec 25th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function similarity(phrases){
  2. if(phrases.length==2){
  3. similarity = 0.58;
  4. return similarity;
  5. }else{
  6. throw "error";
  7.  
  8. }
  9. }
  10.  
  11. setInterval(function(){
  12. console.log(similarity(["test1","test2"]));
  13. },2000);
  14.  
  15.  
  16.  
  17.  
  18.  
  19. G:\TwitterBot>node test.js
  20. 0.58
  21.  
  22. G:\TwitterBot\test.js:12
  23. console.log(similarity(["test1","test2"]));
  24. ^
  25. TypeError: number is not a function
  26. at Timer.<anonymous> (G:\TwitterBot\test.js:12:14)
  27. at Timer.exports.setInterval.timer.ontimeout (timers.js:234:14)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement