Showing posts with label operator. Show all posts
Showing posts with label operator. Show all posts

PHP File Functions

PHP File Functions

integer fopen (string filename, string mode)

This function is used to open the file before writing or reading the contents of the file.
For example:

JavaScript Break Instruction


JavaScript Break Instruction

We can force the loop stops before it’s time for reasons that definite at the beginning of the loop. Break instruction allows to stop a loop (either for the for or while loop). How to use is such as continue instructions, namely the addition of conditional structure in order to stop the loop.

JavaScript Continue


JavaScript Continue Instructions
There are things which should be noticed also, there are times we need to jump on one or more specific values in the loop without stopping the loop itself.
The syntax used here is to continue, and it’s placed in the loop itself, in general we also add conditional structure as a condition so that the syntax is going well.

Javascript For Instructions


Javascript For Instructions
Before talking about the instructions, we talked first about the Loop. Loop is the structure of instructions that can be executed repeatedly as long as the required condition not being met. The most common way of doing loop is to add timer / counter variable (variable increases one unit of value during a one-time loop instructions executed (increment)), Loop will stop if the variable counter has passed the certain value which is used as boundary conditions.

Javascript While Instructions

Javascript While Instructions
While instruction is one of alternative way to run a set of instructions, it is like For instructions as well ..

The syntax of this instruction is as follows:

JavaScript Switch Instructions


JavaScript Switch Instructions

This instruction allows us to test various values of the same variable.
In this way we can do test of various simpler variable value than using if instructions.

JavaScript If Instructions


JavaScript If and If Else Instructions

IF Instruction

The most basic instruction, we can find these instructions in almost every programming language (perhaps with slightly different syntax). This instruction allows us to execute a block of instruction if the condition of the conditions are met.
The syntax of this instruction is as follows:

JavaScript Variable


Working with variables in JavaScript functions
The logic at the time we finished manipulating the variables in the function, and then we get out of the function, then the variable value will be returned to the original value, although we have to change in the function.

JavaScript Operator Priority


JavaScript Operator Priority  
When we involve many operators in one operation, the navigator must know the sequence where the surgery is done on a priority basis from the service.

Here is a table of priority of all operators :

JavaScript Affectation Operators


JavaScript Affectation Operators
This operator allows us to simplify the operation of adding value in a variable and stores the result in the variable itself. This operation is usually written in the following way: x = x +2, using the affectation operation operator can be written into : x+=2, and if the initial value of x=7 then the final value x is 9.

JavaScript Comparison Operators


JavaScript Comparison Operators
If you want to compare a variable with other variable in JavScript you can use Comparison Operators. Here is list of Comparison Operator (with x = 7) :

== To compare two values and verifying similarity
Example: x == 3 return the value True, if x is equal to 3, otherwise the value False

JavaScript Calculation Operators

JavaScript Calculation Operators

Calculation operator allows us to modify the values of variables in mathematics.

Here is some Calculation Operators in JavaScript:
+  (sum), adding the two values
-  (reduction), subtracting one value from another value
*  (multiplication), multiplying the two values
/  (division), divide one value with another value