Search code examples
javascriptspecial-charactersalertconfirm

Special characters in javascript


I have a java script and the code is

confirm("You are selecting to start an Associate who is Pending Red (P RD) status. Is this your intent?")

enter image description here

but i get the below alert with some special characters and but if i see the alert code that i have written, there is no special characters but i get this special character when i execute this code.

dont really know what is the issue....


Solution

  • It might be \uFEFF or \xA0 (BOM and NBSP) make sure you use a space (\u0020).