Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions unicode.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,20 @@ Assign the result to a variable named swappedString.

*/

//Starter Code
// Starter Code
// Task 1
let inputString1 = "Code";
let firstCodePoint; // Your code here
let thirdCodePoint; // Your code here
let firstCodePoint = inputString1.charCodeAt(0);
let thirdCodePoint = inputString1.charCodeAt(2);

// Task 2
let wordFromCodePoints; // Your code here
let wordFromCodePoints = String.fromCharCode(74, 97, 118, 97, 83, 99, 114, 105, 112, 116);

// Task 3
let inputString2 = "Launch";
let swappedString; // Your code here
let firstChar = inputString2.charAt(0);
let lastChar = inputString2.charAt(inputString2.length - 1);
let swappedString = lastChar + inputString2.slice(1, inputString2.length - 1) + firstChar;

// Log all results
console.log({
Expand Down