1. What is Truthy and Falsie Value in JavaScript?

const age = 4;
const age = 0;
const age = "mehadi";
const age = "";
let age;
let age=NaN;
// Falsie value
// 0
// ""
// undefined
// null
// False
// Truthy value
// 0
// ' '
// []
// {}
const age = " ";
if (age.length > 0) {
console.log("condition is true");
} else {
console.log("condition is false");
}

2. What is the difference between null and undefined?


What is React?

How do we use React?

<html>
<head>
<meta charset="utf-8">
<title>Hello world</title>
<!-- Script tags including React -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/reactdom.min.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js">
</script>
</head>
<body>
<div id="app"></div>
<script type="text/babel">
ReactDOM.render(
<h1>Hello world</h1>,
document.querySelector('#app')
);
</script>
</body>
</html>

Block Bindings

var x;
let y;
const z = nextValue;

Var Declarations and Hoisting

var a = 5;
if (true){
var a = 5;
console.log(a); // 5
}
console.log(a); // 5
x=40;
console.log(x); //40
var x;

Math.Abs( )

Math .ceil( )

Math.floor( )

Math.min( )

Math.max( )

Math.random( )

Math round( )


Number

String

Mehadi Hasan

Hello, I am Mehadi Hasan, Frontend React web Developer. From my little knowledge about JavaScript I am trying to publish somethings.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store