How do you put the keyboard line in?



  • There's a line with the keyboard codes, an example of that line: 52, 53 (this is numbers 4 and 5), how am I supposed to uncryptic them and lead them to number?

    So, at the entrance, it's the keyboards 52, 53, and this is the numbers 4 and 5 on the way out? Is there a library for such purposes, or is there any other way to decide?



  • This can be done by JavaScript himself without the use of additional libraries. There's a method. https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode ♪ Here is the example of:

    console.log(String.fromCharCode(52)); // 4
    console.log(String.fromCharCode(53)); // 5
    

    UPD: By the way. 52 and 53 It's not just the keyboard codes. 4 and 5 as many ASCII symbol codes 4 and 5




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2