What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-11 04:14:16
rock paper scissors javascript
const tolowerUcFirst = v => v.charAt(0).toUpperCase() + v.slice(1).toLowerCase() const answer = prompt( 'Do you want to play Rock Paper Scissors? Type yes or no!' ) if (answer && ['Y', 'YES'].includes(answer.toUpperCase())) { let board = ... Add solution -
Javascript 2021-11-10 07:55:20
javascript excel column letter to number
function convertLetterToNumber(str) { str = str.toUpperCase(); let out = 0, len = str.length; for (pos = 0; pos < len; pos++) { out += (str.charCodeAt(pos) - 64) * Math.pow(26, len - pos - 1); } return out; } convertLetterToNumber("... Add solution -
Javascript 2021-11-09 14:31:18
first letter tuUppercase
//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 -
Html 2021-11-08 07:22:11
html view all users in sql db
<html> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> * { box-sizing: border-box; } #myInput { background-image: url('/css/searchicon.png'); background-position: 10px 12px; bac... Add solution -
C++ 2021-11-07 05:51:12
palindrome
function isPalindrome(sometext) { var replace = /[.,'!?\- \"]/g; //regex for what chars to ignore when determining if palindrome var text = sometext.replace(replace, '').toUpperCase(); //remove toUpperCase() for case-sensitive for (var i = 0; i... Add solution