Last active
April 7, 2017 07:10
-
-
Save polaroi8d/e2a0db09aae2f75611ebf349a20ddb5c to your computer and use it in GitHub Desktop.
Test javascript file, to the JerryScript debugger showcase.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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