Friday 15 May 2015

javascript - Endless loops - not sure why? -


Can anyone tell me why this script results in endless loops? var word = ''; Var spacing = / \ s {9} /; Var p; P = spaces.test (word); Do {words = sign ("test", ""); } While (p! = True); Var array = words. Split (""); (I = 0; i & lt; array.label; i ++) for {document.write (array [i] + "
"); }

Do nothing {p} while (conditionally p) Have you ever been walking for forever?

  var word = '', spaces = / \ s {9} /, p; Do {p = spaces.test (word); Word = sign ("test", ""); } While (! P);    

No comments:

Post a Comment