js: array.delete_last() (#11160)

pull/11155/head^2
playX 2021-08-12 19:39:33 +03:00 committed by GitHub
parent 1a7ba6f6d4
commit c9e9556a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -234,3 +234,8 @@ pub fn (a array) contains(key voidptr) bool {
return false return false
} }
// delete_last effectively removes last element of an array.
pub fn (mut a array) delete_last() {
#a.arr.pop();
}