Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created May 29, 2017 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/fa51074ab6f05f097951cfe85afe446f to your computer and use it in GitHub Desktop.
Save codecademydev/fa51074ab6f05f097951cfe85afe446f to your computer and use it in GitHub Desktop.
Codecademy export
// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "Greece";
// Use console.log to print out the length of the variable myCountry.
console.log("myCountry").length;
// Use console.log to print out the first three letters of myCountry.
console.log("myCountry".substring(0,3));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment