Last active
June 18, 2020 17:47
-
-
Save Nathan-Nesbitt/1ce987727a80a47e7e1969d875b15473 to your computer and use it in GitHub Desktop.
Creates a function for a service in Angular NativeScript
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
| export class ExampleServiceService { | |
| constructor() { } | |
| public myTestFunction(...numbers: number[]): number { | |
| // This is a simple function to add up some numbers // | |
| let result = 0; | |
| for (let val of numbers) { | |
| result += val; | |
| } | |
| return result; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment