Javascript escape()

Introduction

The Javascript escape() function encodes special String character by a hexadecimal escape sequence.

escape(str)
ParametersMeaning
str A string to be encoded.
let a = escape('abc123');
console.log(a);/*from w  ww .ja  v  a  2 s.co  m*/
a = escape('!@#$%^&*()');
console.log(a);
a = escape('@*_+-./');
console.log(a);



PreviousNext

Related