Title: ObservableArray.length is read-only · Issue #137 · NativeScript/NativeScript · GitHub
Open Graph Title: ObservableArray.length is read-only · Issue #137 · NativeScript/NativeScript
X Title: ObservableArray.length is read-only · Issue #137 · NativeScript/NativeScript
Description: It's a common practice to empty arrays in JavaScript by setting the length property of the array to zero. This is not possible when using an array wrapped with ObservableArray in NativeScript because ObservableArray.length is a read-only...
Open Graph Description: It's a common practice to empty arrays in JavaScript by setting the length property of the array to zero. This is not possible when using an array wrapped with ObservableArray in NativeScript becau...
X Description: It's a common practice to empty arrays in JavaScript by setting the length property of the array to zero. This is not possible when using an array wrapped with ObservableArray in NativeScript b...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/137
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ObservableArray.length is read-only","articleBody":"It's a common practice to empty arrays in JavaScript by setting the length property of the array to zero.\nThis is not possible when using an array wrapped with ObservableArray in NativeScript because ObservableArray.length is a read-only property.\n\nMaybe this is intended behavior but it might confuse some JavaScript developers.\n\n``` javascript\nvar observableArray = require(\"data/observable-array\");\n\nvar tasks = new observableArray.ObservableArray([]);\ntasks.push({ name: \"foo\" });\ntasks.length = 0;\n// tasks still contains one element at this point\n```\n","author":{"url":"https://github.com/thokrae","@type":"Person","name":"thokrae"},"datePublished":"2015-05-09T16:17:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/137/NativeScript/issues/137"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:33477651-266e-f05b-c90a-ce19c7a07099 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE7E:42CE1:2C50204:3D34160:6A60C21D |
| html-safe-nonce | c93f0e351c12498659988c1726c6684815043c42dc4e738f3a0e517700b0965d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTdFOjQyQ0UxOjJDNTAyMDQ6M0QzNDE2MDo2QTYwQzIxRCIsInZpc2l0b3JfaWQiOiIzNTIwMzYzNzU2OTAzMjUyNTA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 721104fbf82b6c9293ea00c2bb3da31775c0977ec8294fe3372e4aca191095f1 |
| hovercard-subject-tag | issue:74705229 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/137/issue_layout |
| twitter:image | https://opengraph.githubassets.com/74a8eb6b56f8a6597c3f7d5fdac17d4fedadeef1562f79a0fee780bd3bf7a5c0/NativeScript/NativeScript/issues/137 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/74a8eb6b56f8a6597c3f7d5fdac17d4fedadeef1562f79a0fee780bd3bf7a5c0/NativeScript/NativeScript/issues/137 |
| og:image:alt | It's a common practice to empty arrays in JavaScript by setting the length property of the array to zero. This is not possible when using an array wrapped with ObservableArray in NativeScript becau... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | thokrae |
| hostname | github.com |
| expected-hostname | github.com |
| None | e30aeaafb59b2438b8b0aaa24f4c6777e8e86dae0737625adfc928cac5443cd5 |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 34b43e23ce2dc970fbfce25d0e96500f2af8266d |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width