Last active
October 12, 2023 16:28
-
-
Save BrianGenisio/7964192 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.factory('rickAstley', function() { | |
var messages = [ | |
'Never gonna give you up', | |
'Never gonna let you down', | |
'Never gonna run around and desert you', | |
'Never gonna make you cry', | |
'Never gonna say goodbye', | |
'Never gonna tell a lie and hurt you' | |
]; | |
return { | |
get: function() { | |
return { | |
count: 0, | |
next: function() { | |
return messages[this.count++ % messages.length]; | |
} | |
} | |
} | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Never gonna use this code (without you)