Technical Article
104 views0 likes

JavaScript

Data types, Arithmetic operators, logical operators and Logical statements.

Offor Janefrances
November 2, 2025
3 months ago

In Continuation of my last post on JavaScript Data types, let's look into the remaining data types in JavaScript.

Note: Floats are numbers that have decimal points or fractional parts while Integers are whole numbers or numbers that don't have decimal points.

JavaScript Data Types

  1. Boolean:
    This is used to execute conditional logic ( 1 or 0) that is True or false.

  2. Undefined:
    This is used to show that a particular variable doesn't have a value yet ( it has been declared but hasn't been initialized.

  3. Null:
    Doesn't have a value ( it will not have a value)

  4. NaN:
    It means Not a Number, When an arithmetic operation cannot give you a number is called NaN data type.

  5. Void:
    Is a data type that shows when a function doesn't return a value.

  6. Bigint:
    Big integers

Two ways of accessing the value of an object Data types are " Bracket notation and Dot notation.

Example.
Let student id = Student {"reg-number"}
( This is the bracket notation)

Let student name = Student.name
( This is the dot notation)

Functions:
Functions perform a single task and it works with parameter and argument, Parameters is when you are "Defining" a function while "Calling" a function is an Argument.

Let name;
name = "John"

Concatenation is adding two or more strings together

Arithmetic operators and logical operators and Logical statements.

  • , - , / , * , % are Arithmetic operators

< , > , >= , <= , != , == , === , are Relational or comparators operators

! , && , I I , are Logical operators

Methods of JavaScript:

  1. Alert ( ) This is a method that shows a pop up message in the browser.
  2. Prompt ( ) This is a method that shows a pop up asking for an input in the browser

Conditional statements.

Conditional statements are used to control the flow of a program based on specific conditions or decisions.

Types of Conditional Statements:

  1. If Statement: Used to execute a block of code if a condition is true.

  2. If-Else Statement: Used to execute one block of code if a condition is true and another block of code if the condition is false.

  3. If-Else If Statement: Used to check multiple conditions and execute different blocks of code based on the conditions.

  4. Switch Statement: Used to execute different blocks of code based on the value of a variable or expression.

Last updated: February 4, 2026

Written by: Offor Janefrances

More Articles

Deep Technology's

We are on an unwavering mission to be Nigeria's most loved software company, helping people discover new problem-solving strategies to solve problems around the globe.

NO 33 Democracy Crescent, Gaduwa Estate Gudu,Abuja FCT, Nigeria

© 2026 Deep Technology's. All rights reserved.