For a international website, we may need to handle different languages, in some cases, the user may need to input in their language, we cannot control what they type, they may maliciously or accidentally input something that we do not expect. One famous example: const name1 = '\u0041\u006d\u00e9\u006c\u0069\u0065';
const name2 =…