info@enlightsolution.com           01710-318199           9:00AM - 6:00PM

  • Home
  • Services
    • Custom Software Development
    • Web Application
    • Mobile Application
  • Products
    • Enlight Business Solutions
    • Enlight Accounting
    • Enlight HR & Payroll
    • Enlight POS
    • Asset Management System
  • Portfolio
  • Insights
  • About Us
  • Career
  • Contact US

Expressions and Statements in JavaScript (Part 1)

Expressions and Statements in JavaScript (Part 1)

by Admin / Monday, 20 May 2019 / Published in JavaScript

 

Expressions and statements are the bread and butter of a program’s code structure. In this blog I try to explain the concept of expressions and statements.

Expressions are fragments of code that produces a new value as a result. For example it is similar to arithmetical operation. By arithmetical operations we can do addition or subtraction between two numbers or more to create a new number as the result.  There is an easy way to spot expressions is to look for the operator sign in the code.

There are different types of expressions:

  • Arithmetic Expressions :

Expressions that evaluate to a number

  • String Expressions:

Expressions that evaluate to a string

  • Array and Object Expressions:

    These expressions return array or object data type

  • Logical Expressions :

    These expressions return Boolean data type

  • Object Creation Expressions:These expressions return an object
  • Object Property Expressions:

    These expressions return an object property

  • Function Definition Expressions: 

These expressions return a function

On the other hand, Most JavaScript programs contain JavaScript statements . The statements are executed, one by one in the same order as they are written.

 

We can see that , the statements are executed one by one and after statement 4 the result is executed.

 

 

 

Reference: https://eloquentjavascript.net/

 

About Admin

What you can read next

HTTP Module
ECMAScript Modules
Node.js File System Module

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

ENLIGHT SOLUTIONS

Enlight Solutions is working with Leading software development system. We provide out clients nice and fluent software solutions in minimum amount of time.

Quick Links

  • About Us
  • Products
  • Services
  • Portfolio
  • Blog
  • Career

All right reserved.
ENLIGHT SOLUTIONS @ 2019

  • Home
  • contact us
TOP