Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function getRandomNumber() {
return Math.floor(Math.random() * 100);
}
function isEvenNumber(number: number) {
return number % 2 == 0;
}
function getPerson() {
if (isEvenNumber(getRandomNumber())) {
return {
name: {
firstName: 'Keerati',
lastName: 'Limkulphong',
getFullName: function() {
return `${this.firstName} ${this.lastName}`;
}
}
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.