10.02.2018 Views

js_tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Javascript<br />

Ex: C /= A is equivalent to C = C / A<br />

%= (Modules and Assignment)<br />

6<br />

It takes modulus using two operands and assigns the result to the left<br />

operand.<br />

Ex: C %= A is equivalent to C = C % A<br />

Note: Same logic applies to Bitwise operators, so they will become =,<br />

>>=, &=, |= and ^=.<br />

Example<br />

Try the following code to implement assignment operator in JavaScript.<br />

<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!