JavaScript Array Methods in Geogebra

//JavaScript Array Methods [br]//arr.length[br]var arr = new Array(2,3,5,8); [br]alert(arr.length); [br]//////////////////////////////[br]//arr.concat(); [br]var mate = ["Algebra", "Geometry"];[br]var scie = ["Biology", "Chemistry", "Physics"];[br]var stem= ["Technology","Engineering"];[br]var courses = stem.concat(mate, scie);[br]var str="";[br]for(var i=0;i<courses.length;i++){[br] str=str+courses[i]+" ";[br]}[br]alert(str);[br]///////////////////////////////////[br]//arr.indexOf(); [br]var numbers = ["Natural","Whole","Integer","Rational","Real"];[br]alert("index="+numbers.indexOf("Integer"));[br]///////////////////////////////////[br]//arr.join() [br]var angles = ["Acute", "Obtuse", "Right", "Straight"];[br]alert(angles.join());[br]///////////////////////////////////[br]//arr.lastIndexOf();[br]var numbers = ["Natural","Whole","Integer","Rational","Real"];[br]alert("index="+numbers.lastIndexOf("Rational"));[br]///////////////////////////////////[br]//arr.pop(); [br]var angles = ["Acute", "Obtuse", "Right", "Straight"];[br]angles.pop();[br]alert(angles.join());[br]///////////////////////////////////[br]//arr.push();[br]var numbers = ["Natural","Whole","Integer","Rational","Real"];[br]numbers.push("Complex");[br]alert(numbers.join());[br]///////////////////////////////////[br]//arr.reverse();[br]var angles = ["Acute", "Obtuse", "Right", "Straight"];[br]angles.reverse();[br]alert(angles.join());[br]///////////////////////////////////[br]//arr.shift();[br]var angles = ["Acute", "Obtuse", "Right", "Straight"];[br]angles.shift();[br]alert(angles.join());[br]///////////////////////////////////[br]//arr.slice();[br]var numbers = ["Natural","Whole","Integer","Rational","Real"];[br]var counting = numbers.slice(1, 3);[br]alert(counting.join());[br]///////////////////////////////////[br]//arr.sort();[br]var numbers = ["Natural","Whole","Integer","Rational","Real"];[br]numbers.sort();[br]alert(numbers.join());[br]///////////////////////////////////[br]//arr.splice();[br]var quadrilaterals = ["Square","Rectangle","Rhombus","Parallelogram"];[br]quadrilaterals.splice(2, 0, "Trapezium", "Kite");[br]alert(quadrilaterals.join());[br]///////////////////////////////////[br]//arr.toString();[br]var functions = ["Linear", "Square", "Cube", "Square Root","Absolute Value","Reciprocal"];[br]alert(functions.toString());[br]/////////////////////////////////// [br]//arr.unshift();[br]var matrices=["Null","Row","Column","Square"];[br]matrices.unshift("Diagonal","Symmetric");[br]alert(matrices.join());[br]///////////////////////////////////[br]//arr.valueOf();[br]var properties=["Commutative","Associative","Distributive","Identity","Inverse","Closure"];[br]var p=properties.valueOf();[br]alert(p.join());

Information: JavaScript Array Methods in Geogebra