Skip to content

Instantly share code, notes, and snippets.

@damwhit
Created April 1, 2020 07:03
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 damwhit/3656c48a09d5ab8bf85916b53fe6e760 to your computer and use it in GitHub Desktop.
Save damwhit/3656c48a09d5ab8bf85916b53fe6e760 to your computer and use it in GitHub Desktop.
// Assign a variable called pizza a value of ‘the best food of all time’
var pizza = "the best food of all time";
// Assign a variable called isHungry a value of true
var isHungry = true;
// Assign a variable called number a value of 5
var number = 5;
// Reassign that number variable so that is has a value of 4
number = 4;
// Assign a variable called teachers a value of an array with the names ‘Ellen’, ‘Robert’, and ‘David’
var teachers = ["Ellen", "Robert", "David"];
// Try the following (these may take some googling):
// Create another string variable and add combine it with your pizza variable
var newString = "ya ya ya";
var combinedString = newString + pizza;
// Create another integer variable and multiply it by your number variable
var num2 = 77;
var product = num2 * number;
// Remove the last item from your teachers array
teachers.pop();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment