Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const trolledUsers = [
- "Fuzbo",
- ];
- const goodResponses = [
- "Sample Good Response",
- ];
- const badResponses = [
- "Sample Bad Response",
- ];
- function getResponse(user) {
- const responses = trolledUsers.includes(user) ? badResponses : goodResponses;
- return responses[Math.floor(Math.random() * responses.length)];
- }
- getResponse(fromUser);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement