Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created May 29, 2017 07:53
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/62356f49b7edb5cc67bcc5abca39759d to your computer and use it in GitHub Desktop.
Save codecademydev/62356f49b7edb5cc67bcc5abca39759d 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