Learning Center
Learning Center
  • HTML
  • CSS
  • JAVASCRIPT
  • Bootstrap
  • React
  • jQuery
  • NodeJs
  • Sql
  • MySql
  • Python
  • OpenVPN Setup
  • Log In
Coding Choice Home About Contact ☰

  1. You are here
  2. Home
  3. javascript
  4. datatypes

Sidebar
  • Introduction to JS
  • Getting Started with JS
  • Variables in JS
  • Data Types in JS
  • Operators in JS
  • Conditional Statements in JS
  • Loops in JS
  • Functions in JS
  • Objects and Arrays in JS
  • DOM Manipulation in JS
  • Promises in JS
  • Share via
    • Share via...
    • Twitter
    • LinkedIn
    • Facebook
    • Pinterest
    • Telegram
    • WhatsApp
    • Yammer
    • Reddit
    • Teams
  • Send via e-Mail
  • Print
  • Permalink

Data Types in JS

Data Types

JavaScript supports various data types:

  • String: Text values (e.g., “Hello”)
  • Number: Numeric values (e.g., 42)
  • Boolean: True or false
  • Object: Key-value pairs
  • Array: Ordered collections

Example:

let isActive = true;
let items = ["apple", "banana", "cherry"];
let person = { name: "Bob", age: 30 };
console.log(isActive, items, person);