aboutsummaryrefslogtreecommitdiff
path: root/src/extensions/ArrayExtensions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/extensions/ArrayExtensions.ts')
-rw-r--r--src/extensions/ArrayExtensions.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/extensions/ArrayExtensions.ts b/src/extensions/ArrayExtensions.ts
new file mode 100644
index 000000000..422a10dbc
--- /dev/null
+++ b/src/extensions/ArrayExtensions.ts
@@ -0,0 +1,13 @@
+function Assign() {
+
+ Array.prototype.lastElement = function <T>() {
+ if (!this.length) {
+ return undefined;
+ }
+ const last: T = this[this.length - 1];
+ return last;
+ };
+
+}
+
+export { Assign }; \ No newline at end of file