PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Written By
Views

Javascript toLowerCase() - Convert Strings to Lowercase

Javascript toLowerCase() - Convert Strings to Lowercase

a String is a type of data in Javascript, and as with any other type of data, Strings have prototypes and therefore inherit standard methods. One of these methods is toLowerCase(), which you'll often see written as String.prototype.toLowercase(). This method turns any string from any case to just lowercase instead.

Here is a quick example:

let myString = 'HELLO WORLD'
console.log(myString.toLowerCase()) // hello world

This will work on anything which is of string type - so trying to initiate a new String() and use this method also works:

let myString = new String('HELLO!')
console.log(myString.toLowerCase()) // hello!

Comments (0)

loading comments