diff --git a/unicode.js b/unicode.js index 019b581..099f8a9 100644 --- a/unicode.js +++ b/unicode.js @@ -86,15 +86,20 @@ Assign the result to a variable named swappedString. //Starter Code // Task 1 let inputString1 = "Code"; -let firstCodePoint; // Your code here -let thirdCodePoint; // Your code here +let firstCodePoint; // let firstCodePoint = inputString.charCodeAt(0); // Unicode of 'C' + +let thirdCodePoint; // let thirdCodePoint = inputString.charCodeAt(2); // Unicode of 'd' // Task 2 -let wordFromCodePoints; // Your code here +let wordFromCodePoints; // let wordFromCodePoints = String.fromCharCode(72, 101, 108, 108); // Task 3 let inputString2 = "Launch"; -let swappedString; // Your code here +let swappedString; //let swapString = "Launch"; + //let firstCharCode = swapString.charCodeAt(0); // Unicode of 'L' + //let lastCharCode = swapString.charCodeAt(swapString.length - 1); // Unicode of 'h' + + //let swappedString = String.fromCharCode(lastCharCode) + swapString.slice(1, -1) + String.fromCharCode(firstCharCode); // Log all results console.log({