Variables in javascript can have the following content types:
console.log(3+3)
console.log(3-3)
console.log(3*3)
console.log(3/3)
console.log(1<3)
console.log(4>3)
console.log(3 >= 3)
console.log(3 <= 3)
console.log(3 === 3)
console.log(3 === '3')
console.log(3 == 3)
console.log(30 != 20)
The operations that can be done with a string are:
Join string content using the + symbol, this action is called concatenating text.
For example: 'hello'+'world'
For example, to check that a user can be logged in, which can be true or false.
We check if one number is greater than another:
console.log(Boolean(5 > 2)); //returns true
console.log(Boolean(3.14)); //returns true
console.log(Boolean('2' === 2)); //returns false
console.log(Boolean('2' == 2)); // returns true
console.log(Boolean(NaN)); // return false
console.log(Boolean(-1)); // Returns false when negative
console.log(Boolean(0)); // Returns false since it is not positive
console.log(name_var);
var name_var = 5;
var name_var = null;
console.log(name_var);
Tips on SEO and Online Business
Next Articles
Previous Articles