JS—Objects

Objects are special variables in JS, it could contain all of variables types, including function. an simple example with their names. Let's continue, how to show the specific property value, 2 ways: it is also fine to use retrieve variable, How to add new property and property value, Notice: we do not need *var* here. … Continue reading JS—Objects

Advertisements

JS–Array

Array is one part of programming language, which i really don't like. But I met it everyday, so here is some basic methods for how to deal with array. My example: 1. x.push()x.push() is adding element to the end of array   2. x.unshift()x.unshift() is adding element to the beginning of array 3. x.pop() x.pop() … Continue reading JS–Array