I want to mask my javascript variable value.Basically i am getting phone number fields value in variable and after getting it i want to mask it in some other format.
I have tried the jquery Mask plugin but its mask the control's string format.But i want to mask the string into the variable.
Ex:
Let i have a phone string "0000000000"
and i am storing it in a variable :-
var number ="0000000000"
and after that i want to mask it in other formats.Like-
1) number = number.mask('000-0000'); 2) number = number.mask('(000) 000-0000');