simple way to determine weather the given number is odd or even using & operator

& operator is very useful to determine whether the given number is odd or even in any programming language.it is called bitwise operator which operate using the bit of the number. i.e

1=001

2=010

3=011

it is in 3 bit representation.so our concern is whenever we do anding with & operator we get 0 or 1 depending upon nature of the number.if it is even we get 0 otherwise 1.

eg

var a=5;

if(a & 1){

//(“it produces 1”)

console.log(“this statement is true”)

}

now

a=4;

if(a &1){

// it produces zero

so if condition if false

}

Give me one reason why you shouldn’t code?

I think everyone can code.Man itself a learning machine.he/she brain can capture, manipulate and analyse any kind of information that can be perceive by his/her sense organs.then why can’t he/she code?

I like to say coding is one of the measure to check the ability of the person whether or not he/she can solve a give problem in given amount of time.

coding is a long work.it makes our mind sharp, increase our problem solving skill and teaches us iterative procedure to solve any kind of problem.

i feel really sorry for those person who say i can’t.i like to advice those people plz don’t say no to any work.i think as we are being gifted with such powerful tool(brain), we must use it to create S.t beautiful,useful to the mankind.don’t let your life just being past away.leave behind some mark that identify your existence.