An array of basic type values and reference type values, and Vue's official API. $remove (Reference)

Source: Internet
Author: User

Today is Mengo doubts.

Does the element in the array also point to the memory address?

This is a case in point.

  

Wherever A[0],a[2] is, as long as its value is the base type value, it is the comparison of the value, as long as its value is a reference type (object), which is the memory address.

Vue official api:http://cn.vuejs.org/api/#array-_24remove_28reference_29, there is an example of an array. $remove (reference), when the argument is an object, it's all fine. For the base value, it needs to be measured again. For insurance purposes, you can use the Array.splice (index, 1) method and then use the VM. $set trigger the View update (splice can actually trigger the view update, according to Vue's official tutorial).

An array of basic type values and reference type values, and Vue's official API. $remove (Reference)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.