L8V2L Posted August 26, 2014 Share Posted August 26, 2014 (edited) //true/(a+)-1/.test('a-a');/*no variation of this work, any suggestion or and explanation on why?*//(a+)-(a+)-1$-2$/.test('a-a-a-a'); Edited August 26, 2014 by L8V2L Link to comment Share on other sites More sharing options...
L8V2L Posted August 26, 2014 Author Share Posted August 26, 2014 (edited) Never mind: //true/(a+)-(a+)-1-2/.test('a-a-a-a');//add on/^(a+)-(a+)-1-2$/.test('a-a-a-a');//add on/^(a+)-(a+)-(b+)-(b+)-1-3-4-2/.test('a-a-b-b-a-b-b-a');//add on /^b(a+)-(a+)-(b+)-(b+)-1-3-4-2b$/.test('a-a-b-b-a-b-b-a'); Edited August 26, 2014 by L8V2L Link to comment Share on other sites More sharing options...
L8V2L Posted August 27, 2014 Author Share Posted August 27, 2014 (edited) var hello = "";var pump;pump = function(str,hold,erase){if(!(typeof hold === "string")){hold = "";}else if((!Boolean(hold) === false)&&erase){hold = "";}hold += str;return (hold);}var test = "abc";test = pump("hello", hello);hello;//hold to alter variable hello? test; Edited August 27, 2014 by L8V2L Link to comment Share on other sites More sharing options...
thescientist Posted August 27, 2014 Share Posted August 27, 2014 what is this post for? Was there even a question If you don't have a question to ask, and just want to practice to yourself on the fly, use something like http://jsbin.com/ 1 Link to comment Share on other sites More sharing options...
L8V2L Posted August 27, 2014 Author Share Posted August 27, 2014 what is this post for? Was there even a question If you don't have a question to ask, and just want to practice to yourself on the fly, use something like http://jsbin.com/Thanks for the link. Yes there was a question but than I saw the problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now