loading...
Cover image for JavaScript Series – JavaScript Types Cont. – Part 4

JavaScript Series – JavaScript Types Cont. – Part 4

nerdjfpb profile image Muhammad Ali (Nerdjfpb) Originally published at blog.nerdjfpb.com ・1 min read

javascript-nerdjfpb (30 Part Series)

1) JavaScript Series – What is JavaScript? – Part 1 2) JavaScript Series – JavaScript Types – Part 2 3 ... 28 3) JavaScript Series – JavaScript Types Cont. – Part 3 4) JavaScript Series – JavaScript Types Cont. – Part 4 5) JavaScript Comparisons – JavaScript Series – Part 5 6) JavaScript Comparisons – JavaScript Series – Part 6 7) More About Variables – JavaScript Series – Part 7 8) Conditional Statement – JavaScript Series – Part 8 9) More Conditional Statement – JavaScript Series – Part 9 10) Switch – JavaScript Series – Part 10 11) Setup Code Editor – JavaScript Series – Part 11 12) Loops – JavaScript Series – Part 12 13) While Loop – JavaScript Series – Part 13 14) For Loop – JavaScript Series – Part 14 15) For Vs While – JavaScript Series – Part 15 16) Functions - JavaScript Series - Part 16 17) More About Functions – JavaScript Series – Part 17 18) Different types of function – JavaScript Series – Part 18 19) Return in Functions – JavaScript Series – Part 19 20) Array – JavaScript Series – Part 20 21) More About Array - JavaScript Series - Part 21 22) Object – JavaScript Series – Part 22 23) Dom Manipulation – JavaScript Series – Part 23 24) Dom Selector – JavaScript Series – Part 24 25) Style Change in DOM – JavaScript Series – Part 25 26) Play With DOM (querySelector) – JavaScript Series – Part 26 27) Dom Event Introduction - JavaScript Series - Part 27 28) Add New Anime On The List Using Event - JavaScript Series - Part 28 29) Refactor our last tutorial code - JavaScript Series - Part 29 30) Jquery - JavaScript Series - Part 30

Today we’re going to learning about Boolean.

Boolean is a pretty easy stuff. Boolean is just about two state. True & False.

See an example –

Alt Text

Boolean is 1 and 0 actually!

Boolean is really useful in a code. Example –

Alt Text

In the 3 > 4 we get the false. So this is how we can assume some logic is right or not.

Boolean data format is almost available in every programming language.

Do you want to use the ‘true’ and ‘false’ which is boolean or want to use 1 and 0 which also gave the same thing.

Let me know if you have any questions….

You can see the graphical version here

Source Codes - { Check commits }

GitHub logo nerdjfpb / javaScript-Series

A tutorial for JavaScript Beginners

javaScript-Series

A tutorial for Absolute Beginners of JavaScript

You can check the commits to find the part by part codes.

Blogs

Day 1
  • Day 1 - What is JavaScript?
Day 2
  • Day 2 - JavaScript Types?
Day 3
  • Day 3 - Javascript Types Cont.



Originally it published on nerdjfpbblog. You can connect with me in twitter or linkedin !

javascript-nerdjfpb (30 Part Series)

1) JavaScript Series – What is JavaScript? – Part 1 2) JavaScript Series – JavaScript Types – Part 2 3 ... 28 3) JavaScript Series – JavaScript Types Cont. – Part 3 4) JavaScript Series – JavaScript Types Cont. – Part 4 5) JavaScript Comparisons – JavaScript Series – Part 5 6) JavaScript Comparisons – JavaScript Series – Part 6 7) More About Variables – JavaScript Series – Part 7 8) Conditional Statement – JavaScript Series – Part 8 9) More Conditional Statement – JavaScript Series – Part 9 10) Switch – JavaScript Series – Part 10 11) Setup Code Editor – JavaScript Series – Part 11 12) Loops – JavaScript Series – Part 12 13) While Loop – JavaScript Series – Part 13 14) For Loop – JavaScript Series – Part 14 15) For Vs While – JavaScript Series – Part 15 16) Functions - JavaScript Series - Part 16 17) More About Functions – JavaScript Series – Part 17 18) Different types of function – JavaScript Series – Part 18 19) Return in Functions – JavaScript Series – Part 19 20) Array – JavaScript Series – Part 20 21) More About Array - JavaScript Series - Part 21 22) Object – JavaScript Series – Part 22 23) Dom Manipulation – JavaScript Series – Part 23 24) Dom Selector – JavaScript Series – Part 24 25) Style Change in DOM – JavaScript Series – Part 25 26) Play With DOM (querySelector) – JavaScript Series – Part 26 27) Dom Event Introduction - JavaScript Series - Part 27 28) Add New Anime On The List Using Event - JavaScript Series - Part 28 29) Refactor our last tutorial code - JavaScript Series - Part 29 30) Jquery - JavaScript Series - Part 30

Posted on by:

nerdjfpb profile

Muhammad Ali (Nerdjfpb)

@nerdjfpb

An otaku programmer. I want to learn while helping others.

Discussion

markdown guide
 

Well you should avoid to do comparison with 0 & 1 , the condition should always be checked with true and false.