String Operations
Lesson for string-operations
String Operations
Learning from AstroPlatformer
Code Runner Challenge
string-operations
View IPYNB Source
%%js
// CODE_RUNNER: string-operations
let msg = "AstroPlatformer";
console.log("Length:", msg.length);
console.log("Upper:", msg.toUpperCase());
const part = "Level" + " 1";
console.log(msg.includes("Astro") ? "Contains Astro" : "No");
Lines: 1
Characters: 0
Output
Click "Run" in code control panel to see output ...