readingnotes

View project on GitHub

Read06

  • javascript makes web pages more inerested by:access content, modify content,program roles,react to event.
  • A script is a series of instructions that a computer can follow to achieve a goal.
  • To write a script, you need to first state your goal and then list the tasks that need to be completed in order to achieve it.
  • Start with the big picture of what you want to achieve, and break that down into smaller steps.
  • You need to learn to “think” like a computer because they solve tasks in different ways than you or I might approach them.
  • Often scripts will need to perform different tasks in different situations.You can use flowcharts to work out how the tasks fit together.The flowcharts show the paths between each step.
  • An expression evaluates into (results in) a single value. Broadly speaking there are two types of expressions.
  • Expressions rely on things called operators; they allow programmers to create a single value from one or more values.
  • There is just one string operator: the+ symbol.It is used to join the strings on either side of it

    ## Functions let you group a series of statements together to perform a specific task. If different parts of a script repeat the same task, you can reuse the function (rather than repeating the same set of statements).

  • to creat function, you give it a name and then write the statements needed to acheive its task inside the curly braces.
  • declearing function that need information parameters, the parameters act like variable.