DEV Community

stalin s
stalin s

Posted on

JavaScript Primitive types

**Primitives Types **in JavaScript.

These are Seven basic data types in JavaScript.

listed below.
1) String.
2) Number.
3) Boolean
4) Null
5) Undefined
6) Symbol
7) BigInt.

Let's explore these javaScript primitives.

String.

A String represents text data in JavaScript. You create strings by enclosing them in quotation marks:

'Have a nice day'

Image description

We can use singular quote marks ('') or double quote marks ("") to create a string.

Number :

A Number represents numeric data. In Javascript, we can create numbers by writing the number directly in its numeric form:

2321321

Image description

Boolean :

Booleans are very much like light switches. They can only be “switched on” (true) or “switched off” (false).

console.log(true) // true
console.log(false) // false

Image description

Happy Learning

SurveyJS custom survey software

Build Your Own Forms without Manual Coding

SurveyJS UI libraries let you build a JSON-based form management system that integrates with any backend, giving you full control over your data with no user limits. Includes support for custom question types, skip logic, an integrated CSS editor, PDF export, real-time analytics, and more.

Learn more

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay