Skip to content

Commit 47a7fcf

Browse files
committed
Completed Practice Problems LaunchCodeEducation#1 and LaunchCodeEducation#2 - Unicode Lesson
1 parent 683f762 commit 47a7fcf

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

unicode.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,18 @@ Assign the result to a variable named swappedString.
8686
//Starter Code
8787
// Task 1
8888
let inputString1 = "Code";
89-
let firstCodePoint; // Your code here
90-
let thirdCodePoint; // Your code here
89+
let firstCodePoint = inputString1.charCodeAt(0);
90+
let thirdCodePoint = inputString1.charCodeAt(2);
9191

9292
// Task 2
93-
let wordFromCodePoints; // Your code here
93+
let wordFromCodePoints = String.fromCharCode(72, 101, 108, 108);
9494

9595
// Task 3
9696
let inputString2 = "Launch";
97-
let swappedString; // Your code here
97+
let swappedString = String.fromCharCode(inputString2.charCodeAt(inputString2.length - 1)) +
98+
inputString2.slice(1, -1) +
99+
String.fromCharCode(inputString2.charCodeAt(0));
100+
98101

99102
// Log all results
100103
console.log({

0 commit comments

Comments
 (0)