Skip to content

Instantly share code, notes, and snippets.

@shams-ali
Last active January 16, 2017 19:28
Show Gist options
  • Save shams-ali/74f5ebd144940fac2155d17f469bedc8 to your computer and use it in GitHub Desktop.
Save shams-ali/74f5ebd144940fac2155d17f469bedc8 to your computer and use it in GitHub Desktop.
Info Session Run Down
- we're just giving them a taste of what it's like to code. you just open jsbin, explain to them what a variable is as you show them how to write it, do the same with functions and if statements, and then create a function that's a "greeter app" with them where the computer is prompted to say "good morning," "good afternoon," or "good night" based on what time of day it is. then you call the function with different times. when you're creating the greeter app you do it more code along style so that the students are getting the concept of creating if statements and seeing how easy it can be
What is a variable
- You can place data into these containers and then refer to the data simply by naming the container.
- references to data stored in memory
//create a program that's a "greeter app" where the computer is prompted to say "good morning," "good afternoon," or "good night" based on what time of day it is.
//pseudocode this first
var hour = 11;
if (hour < 12) {
console.log('Good morning!');
} else if (hour < 17) {
console.log('Good afternoon!');
} else if (hour < 21) {
console.log('Good evening!');
} else {
console.log('Good night!');
}
//So once you show them how to use conditional statements, you give them the hour, then the problem they must solve is:
//print the appropriate greeting based on the hour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment