It’s harder to digest the title of this article. How can we possibly create a binary executable .exe
file from a JavaScript program if JavaScript is an interpreted language? JavaScript doesn’t even have a compiler so how do we even fathom the idea of generating executables for JavaScript?
A .exe
file is generally called a portable binary executable (PE) file. Unlike a normal program file or simply any file with data of a particular format (such as a _.png_
file), a .exe
file contains various different things such as actual program code, program data, static resources, dependencies among others.
So a binary executable file is more like a compressed file with different data segments that play different roles to execute the program contained in it. This program can be run when the user simply double-clicks on the file. The native operating system understands the .exe
file extension and how to process the file and finally execute the program in it.
#javascript #software-development #npm #nodejs