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
and53
It's not just the keyboard codes.4
and5
as many ASCII symbol codes4
and5
♪