reading-notes

JavaScript

makes our Webpage more intersting and interactive by modifying its content. firsty we can access content by selecting any element, attribute, or text from an HTML pages using javaScript .also, we can modify the content for example adding new page or new feature..etc. additional to that, javaScript language allows us to specify a set of steps for the browser to follow, which allows it to access or change the content of the page.it makes the Webpage more interactive by responding to the user like when he click on a buttun; the script should run. the script is a series of instructions that the computer can follow them step by a step for achieving a goal. the browser implements diffrent parts of the script depending on how the user interacts with the webpage and it runs different part of the code depending on the situation. to write a script; we neen first to choose our goal, then designing the script (we can use flowcharts) and then listing our tasks that we need to achieve.finally we need to code each step to make it possible for the computer to understand.

An expression evaluates into a single value.There are two types of expressions: eexpressions that just assign a value to a variable; each viriable need to be given a value in order to be useful. SINGLE VALUE expressions that use two or more values in order to return a single value.for example if give the varible X the two values (4+6) we will have a one value fot the varible which is (10). Expressions rely on things called operators which allow programmers to create a single value from one or more values. such as assignment operators ( assign a value to a variable), Aarthmetic aperators (Perform basic math +-..etc) and String operators(combine two strings (the +symbol)).

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 st atements). </ to creat a function you need to give it a name and then write the statements that you needed in order to acheive your goal.