Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js test letter lowercase

if (character == character.toLowerCase())
{
  // The character is lowercase
}
else
{
  // The character is uppercase
}
//The problem with this answer is, 
//that some characters like numbers or punctuation 
//also return true when checked for lowercase/uppercase.

// this is the solution for it:
function isLowerCase(str)
{
    return str == str.toLowerCase() && str != str.toUpperCase();
}
Comment

check if string contains lowercase javascript

// A minified version of the other one:
const hasLowerCase= s => s.toUpperCase() != s;

console.log("HeLLO: ", hasLowerCase("HeLLO"));
console.log("HELLO: ", hasLowerCase("HELLO"));
Comment

js if text contains lowercase

function hasLowerCase(str) {
    return str.toUpperCase() != str;
}

console.log("HeLLO: ", hasLowerCase("HeLLO"));
console.log("HELLO: ", hasLowerCase("HELLO"));
Comment

PREVIOUS NEXT
Code Example
Javascript :: callback without duplicates javascript 
Javascript :: get index of selector jquery 
Javascript :: defining schema mongoose 
Javascript :: JavaScript Initialize Variables 
Javascript :: insert a line break into a text component in react-native 
Javascript :: shuffle array in javascript 
Javascript :: scroll up 
Javascript :: javascript /g 
Javascript :: javascript add query string to url 
Javascript :: input show validation message 
Javascript :: You need to inject a global window.jQuery first. 
Javascript :: d3 script 
Javascript :: how to check if string contains substring javascript 
Javascript :: next js get gurrent page params 
Javascript :: js array concat 
Javascript :: electron js hide on tray icon 
Javascript :: error first line of nextjs file 
Javascript :: for loop on array in javascript 
Javascript :: typescript clear array 
Javascript :: how to add array object in javascript 
Javascript :: js random number array 
Javascript :: usestate callback 
Javascript :: onomonrieah 
Javascript :: spray scala JSON formatter override def read examples 
Javascript :: react hook usestate 
Javascript :: datepicker toltip 
Javascript :: jsx not working in react vscode 
Javascript :: how to push array 
Javascript :: vue watch 
Javascript :: create a panda component react 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =