Skip to content

Instantly share code, notes, and snippets.

@Micluc

Micluc/test.js Secret

Last active March 25, 2018 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Micluc/af61e5313e2521533f8c79c320f70898 to your computer and use it in GitHub Desktop.
Save Micluc/af61e5313e2521533f8c79c320f70898 to your computer and use it in GitHub Desktop.
//CHECK#1
var x = [];
var reverse = x.reverse();
assert.sameValue(x, reverse, '1#: x = []; x.reverse() === x. Actual: ' + (reverse));
//CHECK#2
x=[];
x[0]=1;
var reverse=x.reverse();
assert.sameValue(x, reverse, "Value in X[0] = 1; Actual: " + (reverse));
//CHECK#3
x=new Array(1,2);
var reverse=x.reverse();
assert.sameValue(reserve, x, "Value does not match. Actual: " + (reverse));
//CHECK#4
assert.sameValue(2, x[0], "Value does not match. Actual: " + (x[0]));
//CHECK#5
assert.sameValue(1, x[1], "Value does not match. Actual: " + (x[1]));
//CHECK#6
assert.sameValue(x.length, 2, "Length does not match. Actual: " + (x.length));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment