<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>创建动态按钮</TITLE> <META NAME="Email" CONTENT="798033502@qq.com"> <META NAME="Author" CON
public class MyActivity extends Activity { /** * Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(R.layout.main); final LinearLayout layout2
数组的增删改 1.新增一项可以使用concat方法,它不会对原有数组进行改动,而是创建一个新数组 let a = [0, 1, 2] let b = a.concat([3]) console.log(a, b) 2.删除一项对于删除某一项的操作,splice也不能满足要求,因为该方法会改变原有数组,相应地我们应该使用slice,并结合es next 新特性. let array = [1,2,3] const removeIndex = (array, index) => { return [