A Symbol in Computer Programming is Primitive Data type whose instances have a unique human-readable form. Symbols can be used as identifiers. In Some of the Programming Language , Symbol is called as ATOMS. Uniqueness is enforces by holding them in symbol table. They can be used for performing language reflections (callback) or used to create object linkages.
Semicolon ;
This symbol tells the compiler that you have reached the end of a statement. It is like a fullstop in English Language. Simply it ends the line of code.
Eg., echo "The Tech Platform" ;
curly braces { }
These help us group together sections of code for use in different constructs. When opening a curly brace, you always need a closing brace after the group of code. Other wise the code will not run, It will show you error.
Eg., If (a=b)
{
statement
}
Bracket ( )
It is Commonly used to hold parameters or arguments. The brackets can also be used for comparisons as part of selection constructs. Just like in maths it is used , on the same way it is used in Programming Language.
Eg., while ( condition )
Equals ==
It is used to assign the value of variable to something else. This is district from the == Symbol because the single equals symbol changes the value to something.
Checks if the values of two operands are equal or not, if yes then condition becomes true. Eg., A == B is not true
Is Equal To < <= >= >
It is used to compares the two values and return True if they are the same. You cam also use the different Comparisons like
Greater than : Checks if the value of left side is greater than the right side. If yes condition become true. E., A > B is true
Greater than and equal to: Checks if the value of left side is greater than or equal to the value of right side, if yes then condition becomes true. Eg., A >= B is true
Less then : Checks if the value of left side is less than the value of right side, if yes then condition becomes true. Eg., A < B is true
Less than and equal to : Checks if the value of left side is less than or equal to the value of right side, if yes then condition becomes true. Eg., A <= B is true
Is Not Equal !=
It is used to compare two values and return true only if they are not the same. The Symbol ! can be used as the logical concept NOT throughout most of the programming languages.
Checks if the values of two operands are equal or not, if values are not equal then condition becomes true. Eg., A != B
Singles Quotes ' '
It is used to denote that you are writing a character directly into the code. The use of single quotes allows you to store just one letter, number or symbol.
Single Quotes are better readability for empty strings ( ' ' ) looks better than ( " " ). and it is easier to write html within javascript. But the main disadvantage of single quote is that it is not supported by JSON.
Eg., echo ' The Tech Platform ' ;
Double Quotes " "
It is used to denote that you are writing a string directly into the code. The use of the double quotes allows you to store any combination of letter, number and symbols but changes the type of comparisons you can perform on the data.
In JSON, The only quoting style allowed is double quotes ( " ") and it also eliminated the need to escape apostrophes when writing sentences in English. But the main disadvantage is that it must press extra key (shift) when wanting to use double quotes.
Eg., echo " The Tech Platform " ;
Square Brackets [ ]
There are used to define the use of an array, remembering that array indexes start at 0 so that element 1 of an array is array[0] and element 10 is array[9].
The Tech Platform
Comments