Skip to content

Instantly share code, notes, and snippets.

@polaroi8d
Last active April 7, 2017 07:10
Show Gist options
  • Save polaroi8d/e2a0db09aae2f75611ebf349a20ddb5c to your computer and use it in GitHub Desktop.
Save polaroi8d/e2a0db09aae2f75611ebf349a20ddb5c to your computer and use it in GitHub Desktop.
Test javascript file, to the JerryScript debugger showcase.
print("how-to-debug");
function pow(n) {
return n*n
}
function rectangle(a,b)
{
var rectangleObject = {};
print("function-rectangle");
rectangleObject.area = a * b;
rectangleObject.district = (2 * a) + (2 * b);
return rectangleObject;
}
var a = 10;
var b = 3;
result = rectangle(a,b);
print("The district: " + result.district)
print("The area: " + result.area)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment