DEV Community

SraboniAkhter
SraboniAkhter

Posted on

Some things you should be known as a JavaScript developer

What to look for in a JavaScript developer
JavaScript is the single most important programming language used in the development of contemporary software. Approximately 95% of websites use JavaScript to introduce dynamic content to their visitors. Despite the importance of JavaScript for web and mobile development, many hiring managers do not know what to look for in a JavaScript developer.

If-else
If a certain condition is true then the if / else statement executes a block of code. If the condition is false, another block of code can be executed. The if / else statement is a part of JavaScript's "conditional" statement, which is used to perform different actions based on different conditions.
Example:
var number = 21;
if (number > 17) {
console.log(“condition is true”);
}else{
console.log(“condition is a false”);
}
null VS undefined
Null is a blank or non-existent value in JavaScript and must be assigned. But undefined means a variable has been declared, but a value has not been defined.
Example:
let number = null;
console.log(number);
// null
let sraboni;
console.log(sraboni);
// undefined

What is === in JavaScript?
=== A strict parity is called an operator, which shows the truth if two operands have the same value without conversion. If you compare "21" with 21 using ===, it will give you a false value.

** What is == in JavaScript?**
The parity compares two objects based on the operator or "==" memory reference. So the "==" operator will return true only if it compares the references of two objects and presents the exact same object otherwise "==" will return false.

double equal(==) VS triple equal(===)
“==” only tests for quality parity, where “===” is a strict parity test and returns false if the values ​​or types of the two variables are different. The difference between == and === is that: == converts the variable values to the same type before performing comparison. This is called type coercion. === does not do any type conversion (coercion) and returns true only if both values and types are identical for the two variables being compared.

Top comments (0)