String that contains all ascii characters

前端 未结 7 1296
灰色年华
灰色年华 2021-02-03 23:01

I want to create a string in JavaScript that contains all ascii characters. How can I do this?

7条回答
  •  醉话见心
    2021-02-03 23:36

    var s = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~';
    

提交回复
热议问题