Volunteer for Global Hope Network International

January 2015 – I started as Social Media Team Leader (volunteer, part-time) for Global Hope Network International – GHNI (ghni.org).

GHNI 01-13-2014-logo

GHNI had run over 100 projects and have opened doors to bring sustainable and transformational assistance to communities in Africa, Asia and the Middle East.

The Social Media Team as of 2015 are all volunteers, we contribute time to reach out and engage audience via multiple channels.

I’m excited to contribute to GHNI for their good work and look forward to their staff and the social media team.

Rock, Paper & Scissors in JavaScript

The code:

var userChoice = prompt(“Do you choose rock, paper or scissors?”);
var computerChoice = Math.random();
if (computerChoice < 0.34) {
computerChoice = “rock”;
} else if(computerChoice <= 0.67) {
computerChoice = “paper”;
} else {
computerChoice = “scissors”;
}
console.log(“Computer: ” + computerChoice);
var compare = function(userChoice, computerChoice) {
if (userChoice == computerChoice)
{
return “The result is a tie!”;
}

else if (userChoice == “rock”) {
if (computerChoice == “scissors”) {
return “rock wins”;
}
else {
return “paper wins”;
}
}
else if (userChoice == “paper”) {
if (computerChoice == “rock”) {
return “paper wins”;
}
else {
return “scissors wins”;
}
}
else if (userChoice == “scissors”) {
if (computerChoice == “rock”) {
return “rock wins”;
}
else {
return “scissors wins”;
}
}
}
compare(userChoice, computerChoice);

==

How it actually looks with correct formatting:

Rock, Paper & Scissors