Javascript Boolean Variable Types – POFTUT

Javascript Boolean Variable Types


While making decisions we generally need some logic values. Logic values are generally true and false . In Javascript these values are called as Boolean type. Boolean type variables holds logic values true and false. This type is simpler against string and number.

var open=true;
  • open variable is boolean type and hold value true.

Convert To The String

Boolean values can be converted to the string like below.

var open=true;
openString = open.toString();
  • open holds true value
  • toString will convert boolean true to string.

LEARN MORE  What Is A Variable and How To Define and Use Variables In Programming Languages Like PHP, Python, Java, C#, C/C++, JavaScript, PowerShell, Bash?

Leave a Comment