Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

solution-exercise-6.js 378B

12345678910111213141516
  1. 'use strict'
  2. function makeLowerCase(input) {
  3. let output = '';
  4. for (let i = 0; i < input.length; i++) {
  5. let charCode = input.charCodeAt(i);
  6. if (charCode >= 65 && charCode <= 95 ) {
  7. output += String.fromCharCode(charCode + 32);
  8. } else {
  9. output += String.fromCharCode(charCode);
  10. }
  11. }
  12. return output;
  13. }
  14. console.log(makeLowerCase('JAVASCRIPT'));