JavaScript if statement | JavaScript if else statement - JavaScript Tutorial 33

preview_player
Показать описание
Notes for You:: JavaScript if statement
- Browser executes true part of the if statement;
- if the given conditional expression evaluates to true.

syntax:
if(conditional expression) {
statements; // true part
}

JavaScript if else statement:
- Browser executes true part of the if else statement;
- if the given conditional expression evaluates to true;
- else it executes the false part.

syntax:
if(conditional expression) {
statements; // true part
}
else {
statements; // false part
}

Note:
- if true part gets executed then false part don't get execute, vice versa.

Example code:
var a = 20;
if(a == 10){
}
else{
}

Output:
a is not equal to 10

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

Follow the link for next video:
JavaScript Tutorial 34 - Ternary Operator vs. if else Statement in JavaScript

Follow the link for previous video:
JavaScript Tutorial 32 - Control Statements in JavaScript

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

JavaScript Tutorials Playlist:-

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

jQuery Tutorials Playlist:-

jQuery UI Tutorials Playlist:-

Bootstrap Tutorials Playlist:-

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

► Subscribe to our YouTube channel:

► Visit our Website:

=========================================
Hash Tags:-
#ChidresTechTutorials #JavaScript #JavaScriptTutorial
Рекомендации по теме
Комментарии
Автор

SUBSCRIBE, SHARE & SUPPORT:
VISIT & LEARN AT FREE OF COST:

ChidresTechTutorials
Автор

i saw many youtube videos about data types, variables sir. game application palyerName is string type, playerScore is Number data type, isGameOver boolean data type. excellent examples sir. we can easily remember this concept through example sir.
variables, constant presentation is vere level sir var playerName=rakesh, browser will create variable name with playerName and value is rakesh. constant value is excellent presentation sir. after watching ur videos i improved my subject skills, communication skills, presentation skills sir. thanks alot sir.

vamsikrishna
Автор

And you speak English so fluently
I just like it😍

mutaharjamallaskar
Автор

Chapede bagundi video quality kani chusukovala sir

rrafi
Автор

Sir can we make search engine website using html

I_am_SK
Автор

hi sir very good morning, sir can you send me some question about 'IF Else'

kirankumardanglukar