JS Data Types or JavaScript Data Types

string- a character or a string of characters

number- an integer or floating-point number

boolean- a value with true or false.

function- a user-defined method

object- a built-in or user-defined object


var mystring= "I am a string";

var myinteger=168;

var myfloat=12.88;

var mybool=true;


var mystring=”I am a string”; // mystring data type is a string.

var myinteger=168; // myinteger data type is a number.

var myfloat=12.88; // myfloat data type is a number.

var mybool=true; //mybool data type is boolean.

Note: Double quotes are always used in the string. e.g. “abcde”, “learning”.

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy