#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
Fundamentals

Strings in JavaScript

What is a String?

A string represents textual data, written inside single quotes, double quotes, or backticks (template literals).

let single = 'Hello';
let double = "World";
let name = "John";
let template = `Hi, ${name}!`; // template literal

Common String Methods

  • length — returns the number of characters.
  • toUpperCase() / toLowerCase() — changes case.
  • slice(start, end) / substring() — extracts part of a string.
  • trim() — removes whitespace from both ends.
  • replace() — replaces part of a string with another.
  • split() — splits a string into an array based on a separator.

Ready to master real-world JavaScript development?

Learn JavaScript hands-on with mentor-led, live sessions.

Explore Course