What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-27 10:12:11
javascript capitalize first letter of each word
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Javascript 2021-10-26 21:43:09
ejs if else
<h1>Hey <%= title.toUpperCase() %>, Welcome </h1> <% if(title.toLowerCase() === "Rabbit"){ %> <p>Welcome Code_Breaker!</p> <% } else { %> <p>You are not Code_Breaker</p> <% } %> Add solution -
Java 2021-10-24 18:30:16
java how to make a string lowercase
/* to find the lowercase or uppercase of a string, * we just .toLowerCase() or .toUpperCase() */ public class CaseDemonstration { public static void main(String[] args) { String testString = "THIS IS AN EXAMPLE OF A STRING"; Str... Add solution -
Javascript 2021-10-22 22:47:06
javascript capitalize
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Javascript 2021-10-22 09:13:10
Replace With Alphabet Position
function alphabetPosition(text) { var result = ""; for (var i = 0; i < text.length; i++) { var code = text.toUpperCase().charCodeAt(i) if (code > 64 && code < 91) result += (code - 64) + " "; } return ... Add solution