Development in platform ecosystems
  • Home
  • Learn

JavaScript

  • Introduction
  • Variables
  • Functions
  • Data types
    • Built-in types
    • Strings
      • Creation
      • Concatenation
      • Capitalization
      • Contains
      • Replace
      • Length
      • Search
      • Substring
      • Split
      • Comparison
      • Formatting
    • Numbers
    • Booleans
    • Indexed collection (arrays)
    • Keyed collection (objects)
  • Control flow
  • Asynchronous
  • Fetching external data
  • Manipulating documents

JavaScript

  • Introduction
  • Variables
  • Functions
  • Data types
    • Built-in types
    • Strings
      • Creation
      • Concatenation
      • Capitalization
      • Contains
      • Replace
      • Length
      • Search
      • Substring
      • Split
      • Comparison
      • Formatting
    • Numbers
    • Booleans
    • Indexed collection (arrays)
    • Keyed collection (objects)
  • Control flow
  • Asynchronous
  • Fetching external data
  • Manipulating documents

JavaScript String Type

Capitalization

Sometimes it's useful to convert a string to entirely lower or upper case characters. The toLowerCase and toUpperCase methods can do this for us.

const title = "Red Seas Under Red Skies"
console.log(title.toLowerCase()) // red seas under red skies
console.log(title.toUpperCase()) // RED SEAS UNDER RED SKIES

Read more on MDN

String.prototype.toLowerCase()

Read more on MDN

String.prototype.toUpperCase()

PrevNext

© 2026 DHIS2 Design Lab