Javascript
What is a script
A SCRIPT IS A SERIES OFINSTRUCTIONS A script is a series of instructions that a computer can follow to achieve a goal.
WRITING A SCRIPT
To write a script, you need to first state your goal and then list the tasks that need to be completed inorder to achieve it.
Start with the big picture of what you want to achieve, and break that down into smaller steps. 1: DEFINE THE GOAL First, you need to define the task you want to achieve. You can think of this as a puzzle for the computer to solve. 2: DESIGN THE SCRIPT To design a script you split the goal out into a series of tasks that are going to be involved in solving this puzzle. This can be represented using a flowchart. You can then write down individual steps that the computer needs to perform in order to complete each individual task (and any information it needs to perform the task), rather like writing a recipe that it can follow. 3: CODE EACH STEP Each of the steps needs to be written in a programming language that the computer understands. In our case, this is JavaScript.
SUMMARY
A script is a series of instructions that the computer can follow in order to achieve a goal. Each time the script runs, it might only use a subset of all the instructions. Computers approach tasks in a different way than humans, so your instructions must let the computer solve the task prggrammatically. To approach writing a script, break down your goal into a series of tasks and then work out each step needed to complete that task (a flowchart can help).