What is Script?
A “script” is a type of program that you can write and run immediately. The process of converting the code into a format the computer can understand (compilation) happens automatically in the background, so you can see the results of your code right away.
In Simple Terms
A script is a “program that you write and run instantly.”
In Detail
When creating a program, the typical steps are:
- Programming: Writing the code in a human-readable format.
- Compilation: Converting the code into a format the computer can understand.
- Execution: Running the program on the computer.
For scripts, the compilation step is handled automatically behind the scenes, allowing you to write code and see the results immediately without manually compiling it.
Examples
For example, programs written in JavaScript or PHP are scripts. When you modify a PHP program, you can see the changes right away, even though the computer is performing the compilation process behind the scenes.
Summary
A “script” is a type of program that allows you to “write and run it immediately,” with the compilation process occurring automatically in the background.