DEV Community

Mahin Tazuar
Mahin Tazuar

Posted on

Js Statement vs Expression

Image description**

Expression

** When we are use any value for using insiade a variable, If else condition, Loop etc. This value initialization are called expression. Simple Statement justify the expression and do the action after considering the expression.

// Expression
'Zonayed' + ' ' + 'Ahmed';
Enter fullscreen mode Exit fullscreen mode

**

Statement -

** Simple inside javascript when we are using second bracket after closing that we are using semicolone that's whole syntext called statement. In details statement working with expression, consider it and do the action after justify the expression.

// Statement
for(expressions) {
   //Some Code here
}
Enter fullscreen mode Exit fullscreen mode

Remember if we are using arrow function inside a variable that whole things are not Statement that is called expression.

Discussion (0)