JAVA-1749 Move modules language interop and console

This commit is contained in:
mikr
2020-06-07 13:22:16 +02:00
parent 76dbb91058
commit 4cb07819f3
17 changed files with 214 additions and 9 deletions

View File

@@ -1,15 +0,0 @@
var first = {
name: "Whiskey",
age: 5
};
var second = {
volume: 100
};
Object.bindProperties(first, second);
print(first.volume);
second.volume = 1000;
print(first.volume);

View File

@@ -1 +0,0 @@
print(__FILE__, __LINE__, __DIR__);

View File

@@ -1,19 +0,0 @@
var math = {
increment: function (num) {
return ++num;
},
failFunc: function () {
try {
throw "BOOM";
} catch (e if typeof e === 'string') {
print("String thrown: " + e);
}
catch (e) {
print("this shouldn't happen!");
}
}
};
math;

View File

@@ -1,11 +0,0 @@
var demo = {
__noSuchProperty__: function (propName) {
print("Accessed non-existing property: " + propName);
},
__noSuchMethod__: function (methodName) {
print("Invoked non-existing method: " + methodName);
}
};
demo;

View File

@@ -1 +0,0 @@
function increment(num) ++num;

View File

@@ -1,2 +0,0 @@
print(" hello world".trimLeft());
print("hello world ".trimRight());

View File

@@ -1,9 +0,0 @@
function arrays(arr) {
var javaIntArray = Java.to(arr, "int[]");
print(javaIntArray[0]);
print(javaIntArray[1]);
print(javaIntArray[2]);
}
arrays([100, "1654", true]);