Skip to content

Latest commit

 

History

History
62 lines (51 loc) · 1.46 KB

w2d1.md

File metadata and controls

62 lines (51 loc) · 1.46 KB

Assessment

Week 2

Day 1

ThePunisher

The punisher is gonna get started in class. First we need a function that randomizes all the posibly punishments and returns one:

var punishment = function(){
<<<<<<< HEAD
	var x = Math.random() * 9;
	if(x < 1) {
		return "Buy/make coffee and serve everyone."
	}
	else if(x<2) {
		return "Write a blog post."
	}
	else if(x<3) {
		return "Come to next class in formal attire."
	}
	else if(x<4) {
		return "Sing/dance in front of class."
	}
	else if(x<5) {
		return "Stand in the corner for one hour."
	}
	else if(x<6) {
		return "Bow to everyone and apologize seriously."
	}
	else if(x<7) {
		return "Push up *2 for every min late."
	}
	else if(x<8) {
		return "Jog to ferry pier during lunch and take a selfie."
	}
	else {
		return "End convo with 'lunch is coming' until lunchtime."
	}
=======

  // Your magic here

>>>>>>> 7ecd311aef6bb19a9ca378c712b678c1348d9577
}

console.log("The punishment is: ", punishment());
Directions
  • For the repo official thePunisher repository
  • Implement a punishment function as above
  • Commit your changes and push them to your fork
  • Submit a pull request to our class repo

Bonus

  • Create an html page, style it with bootstrap and integrate the function so that the website shows a random punishment every time it's loaded
  • Add any magic you can think of
  • Submit a pull request to our class repo with the changes you came up with