Making a game character move

Hello, people. Now, a lot of people may start text coding just to make video games but quit very soon because they don't even know how to make a character move. Some people may try this code, <!DOCTYPE html>  Insert title here  var the_move = 1 document.addEventListener('keydown', function(w){

if(w.key == 'w') console.log('hei w') {

the_move ==2

}})document.addEventListener('keydown', function(s){ if(s.key == 's') console.log('hei s') { 		the_move == 2 } }) document.addEventListener('keydown', function(a){ if(a.key == 'a') console.log('hei a') { 		the_move == 3 } }) (This code was made in EclipseIDE2020-03). No. This is not the code. The code is when you make an entirely new file in the project folder and import it to the main file. JAVASCRIPT INCLUDED. The main file should not have this code when you retry it after importing, "". Instead, you will put this code into the file that your importing but without the JavaScript. (The import code is coming soon).