php-mysql tutorial

Designed By NISHANT GUPTA

  • Home
  • PHP
  • HTML
  • CSS
  • JavaScript
  • JQuery
  • Contact-us
  • Learn HTML

    • Introduction of HTML
    • Image Handling in HTML
    • List Handling in HTML
    • Font Handling in HTML
    • Table Handling in HTML
    • Form Handling in HTML
  • Learn CSS

    • Introduction of CSS
    • Styling Background in CSS
    • Styling Text in CSS
    • Styling Font in CSS
    • Styling Link in CSS
    • Styling List in CSS
    • Styling Table in CSS
    • Styling Div in CSS
    • Styling Span in CSS
    • Positioning in CSS
    • Display in CSS
  • Learn JavaScript

    • Introduction of JavaScript
    • Data Type in JavaScript
    • Variable in JavaScript
    • Oprator in JavaScript
    • Cond. Statement in JavaScript
    • Loop in JavaScript
    • Array in JavaScript
    • Function in JavaScript
    • Date in JavaScript
    • String in JavaScript
    • DOM in JavaScript
    • Event Handling in JavaScript
    • Form Handling in JavaScript
  • Learn PHP-MYSQL

    • Introduction of PHP
    • Decision Control in PHP
    • Loop in PHP
    • Array in PHP
    • Function in PHP
    • Form Handling in PHP
    • File Inclusion in PHP

Oprator in JavaScript

Operators
JavaScript language supports following type of operators.
  1. Arithmetic Operators.
  2. Comparision Operators.
  3. LogicalĀ  Operators.
  4. Assignment Operators.

Arithmetic Operators

Assume variable A holds 10 and variable B holds 20 then

Operator

Description

Example

+

Adds two operands

A + B will give 30

-

Subtracts second operand from the first

A - B will give -10

*

Multiply both operands

A * B will give 200

/
Divide numerator by denumerator

B / A will give 2

%

Modulus Operator and remainder of after an integer division

B % A will give 0

++
Increment operator, increases integer value by one

A++ will give 11

--

Decrement operator, decreases integer value by one

A-- will give 9

Comparison Operators

Given that x=5, the table below explains the comparison operators:

Operator
Description
Comparing
Returns
==
Is Equal to
x==8
false
x==5
true
===

Is Exactly equal to (value and type)

x==="5"
false
x===5
true
!=
Is Not Equal
x!=8
true
!==

Is Not Equal (neither value nor type)

x!=="5"
true
x!==5
false
>
Is Greater than
x>8
flase
<
Is Less than
x<8
true
>=
Is Greater than or Equal to
x>=8
false
<=
Is Less than or Equal to
x<=8
true

Advertisements

 

©  2014 All Rights Reserved  •  Design by >Nishant Gupta.

Privacy Policy • Terms of Use