View sourcecode

The following files exists in this folder. Click to view.

exercise.js

1 lines ASCII Unix (LF)
1
/**
 * Question 1
 **/
 document.writeln(myFirstArray());

 document.writeln('<br>');

/**
 * Question 2
 **/
 document.writeln(arraySentence());

 document.writeln('<br>');

/**
 * Question 3
 **/
 document.writeln(checkArray(["test", "this", "array"]));

 document.writeln('<br>');

/**
 * Question 4
 **/
 document.writeln(concArrays());

 document.writeln('<br>');

/**
 * Question 5
 **/
 document.writeln(reverseArray([1,2,3,"four","five","six"]));

 document.writeln('<br>');

/**
 * Question 6
 **/
 document.writeln(findIndex(["test", 2, "more text", 67, 4], 67));

 document.writeln('<br>');

/**
 * Question 7
 **/
 document.writeln(countArray([3,5,6,78,23,12,45,34,"test","anotherTest"]));

 document.writeln('<br>');

/**
 * Question 8
 **/
 document.writeln(changeArrayElements([1,2,3,4,5,"test","anotherTest","t"]));

 document.writeln('<br>');

/**
 * Question 9
 **/
 document.writeln(joinArray(["This", "is", "a", "string."]));

 document.writeln('<br>');

/**
 * Question 10
 **/
 document.writeln(lastIndex([5,3,2,34,5,2,77,"test",4,5,65]));

 document.writeln('<br>');

/**
 * Question 11
 **/
 document.writeln(popArray([5,3,5,65]));

 document.writeln('<br>');

/**
 * Question 12
 **/
 document.writeln(pushArray([5,3,5,65], 100));

 document.writeln('<br>');

/**
 * Question 13
 **/
 document.writeln(shiftArray([5,3,5,65]));

 document.writeln('<br>');

/**
 * Question 14
 **/
 document.writeln(sortArray([5,3,99,65,34,1,26]));

 document.writeln('<br>');