Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Say Hello Say Bye in javascript

function sayHelloBye(name, num) {
	if (num === 1) return ("Hello " + name.charAt(0).toUpperCase() + name.slice(1));
	else if (num ===0) return ("Bye " + name.charAt(0).toUpperCase() + name.slice(1));
}
 
PREVIOUS NEXT
Tagged: #Say #Hello #Say #Bye #javascript
ADD COMMENT
Topic
Name
2+1 =