GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — JavaScript/String/Lower.js at master · TheAlgorithms/JavaScript Expand file tree/ Copy pathLower.jsMore file actions 20 lines (17 loc) · 477 Bytes / Copy pathLower.jsFile metadata and controls20 lines (17 loc) · 477 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 /** * @function lower * @description Will convert the entire string to lowercase letters. * @param {String} str - The input string * @returns {String} Lowercase string * @example lower("HELLO") => hello * @example lower("He_llo") => he_llo */ const lower = (str) => { if (typeof str !== 'string') { throw new TypeError('Invalid Input Type') } return str.replace(/[A-Z]/g, (char) => String.fromCharCode(char.charCodeAt() + 32) ) } export default lower |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |