ethar turky
asked on
split not working if pass split character as variable
Dear all,
Please take a look at this code:
http://jsfiddle.net/ethar1/8FBA9/
split function not working as expected if passed as parameter
thanks
Please take a look at this code:
http://jsfiddle.net/ethar1/8FBA9/
split function not working as expected if passed as parameter
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
\ is the escape character when you're using it in a string in your code :
var str = "_______\n_______"; // here \n is a single character
but in textbox, you type two characters : \ followed by n
the \ is not the escape character
var str = "_______\n_______"; // here \n is a single character
but in textbox, you type two characters : \ followed by n
the \ is not the escape character
ASKER
thanks
'welcome
ASKER
thanks,