Skip to content

Instantly share code, notes, and snippets.

@efuquen
Last active August 29, 2015 14:15
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 efuquen/88e8ced65ddde45e1644 to your computer and use it in GitHub Desktop.
Save efuquen/88e8ced65ddde45e1644 to your computer and use it in GitHub Desktop.
MIHS ScriptEd Do Now for 2/10/2015

#MIHS ScriptEd Exit Ticket - 2/10/2015

Get a sheet of paper, write your name, and then answer the following questions:

  1. For the string "We're all alike." What is the index of the first space, the index of the second space, and the index of the period? What is the length of the string?

  2. Write what will be printed to the console after the following code:

var message = "We can't stop at all"
message = message.replace("at", "us");
message = message.replace("We", "You");
message = message + ".";
message = message.toUpperCase();
console.log(message);
  1. There are three things wrong with this function, list them:
function (firstName, lastName) 
  return "My Full Name is: " + firstname + " " lastName;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment