Increment & Decrement Operators in JavaScript Part 1 - JavaScript Tutorial 26

ChidresTechTutorials
ChidresTechTutorials
8.3 هزار بار بازدید - 8 سال پیش - Notes for You:: JavaScript Increment
Notes for You:: JavaScript Increment and Decrement Operators Part 1:
- are used to increment or decrement a variable value by 1.

++ (Increment Operator):
- is used to increment a variable value by 1
- Post Increment: variableName ++
- Pre Increment : ++ variableName

-- (Decrement Operator):
- is used to decrement a variable value by 1
- Post Decrement: variableName --
- Pre Decrement : -- variableName

Example Code1:
var a=10;
document.write("a=",a); //a=10
a++; // a=a; a=a+1;
document.write("a=",a); //a=11

var a=10;
document.write("a=",a)  // a=10
++a; // a=a+1; a=a;
document.write("a=",a); // a=11

var a=10;
document.write("a=",a); // a=10
a--; // a=a; a=a-1;
document.write("a=",a); //a=9

var a=10;
document.write("a=",a); // a=10
--a; // a=a-1; a=a;
document.write("a=",a); //a=9

=========================================

Follow the link for next video:
JavaScript Tutorial 27 - Increment & Decrement Operators in JavaScript - Part 2
Increment & Decrement Operators in Ja...

Follow the link for previous video:
JavaScript Tutorial 25 - Assignment Operators in JavaScript | JavaScript Assignment Operators
JavaScript Assignment Operators | Ass...

=========================================

JavaScript Tutorials Playlist:-
JavaScript Tutorials

=========================================
Watch My Other Useful Tutorials:-

jQuery Tutorials Playlist:-
jQuery Tutorials

jQuery UI Tutorials Playlist:-
jQuery UI Tutorials

Bootstrap Tutorials Playlist:-
Bootstrap Tutorials

=========================================

► Subscribe to our YouTube channel:
chidrestechtutorials  

► Visit our Website:
https://www.chidrestechtutorials.com

=========================================
Hash Tags:-
#ChidresTechTutorials #JavaScript #JavaScriptTutorial
8 سال پیش در تاریخ 1395/12/05 منتشر شده است.
8,323 بـار بازدید شده
... بیشتر