summaryrefslogtreecommitdiff
path: root/Base/home/anon/js
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-03-16 14:58:20 +0100
committerAndreas Kling <kling@serenityos.org>2020-03-16 14:58:20 +0100
commit086f68e878472034574c4bb7ccf5288d5035a7d2 (patch)
tree911f70e761be11ffbc321838633919f5e07d7a12 /Base/home/anon/js
parent19452230cd86659eecc5856767d223f44ddbfed9 (diff)
downloadserenity-086f68e878472034574c4bb7ccf5288d5035a7d2.zip
LibJS: Replace the global print() function with console.log() :^)
Diffstat (limited to 'Base/home/anon/js')
-rw-r--r--Base/home/anon/js/charAt.js2
-rw-r--r--Base/home/anon/js/hasOwnProperty.js2
-rw-r--r--Base/home/anon/js/native-function.js2
-rw-r--r--Base/home/anon/js/simple-scopes.js2
-rw-r--r--Base/home/anon/js/strings.js10
-rw-r--r--Base/home/anon/js/type-play.js20
6 files changed, 19 insertions, 19 deletions
diff --git a/Base/home/anon/js/charAt.js b/Base/home/anon/js/charAt.js
index 610305e6ce..9a452fb4f5 100644
--- a/Base/home/anon/js/charAt.js
+++ b/Base/home/anon/js/charAt.js
@@ -1,2 +1,2 @@
var foo = "foobar";
-print(foo.charAt(3));
+console.log(foo.charAt(3));
diff --git a/Base/home/anon/js/hasOwnProperty.js b/Base/home/anon/js/hasOwnProperty.js
index 26456344ab..d874105c00 100644
--- a/Base/home/anon/js/hasOwnProperty.js
+++ b/Base/home/anon/js/hasOwnProperty.js
@@ -1,2 +1,2 @@
var x = "foobar";
-print(x.hasOwnProperty("length"));
+console.log(x.hasOwnProperty("length"));
diff --git a/Base/home/anon/js/native-function.js b/Base/home/anon/js/native-function.js
index 932eb9cf56..529c4df04f 100644
--- a/Base/home/anon/js/native-function.js
+++ b/Base/home/anon/js/native-function.js
@@ -1 +1 @@
-print("Hello friends!")
+console.log("Hello friends!")
diff --git a/Base/home/anon/js/simple-scopes.js b/Base/home/anon/js/simple-scopes.js
index 8580a8c770..14e6c35e75 100644
--- a/Base/home/anon/js/simple-scopes.js
+++ b/Base/home/anon/js/simple-scopes.js
@@ -8,4 +8,4 @@ function foo() {
return y;
}
-print(foo());
+console.log(foo());
diff --git a/Base/home/anon/js/strings.js b/Base/home/anon/js/strings.js
index 74cf39785d..1928d61d6f 100644
--- a/Base/home/anon/js/strings.js
+++ b/Base/home/anon/js/strings.js
@@ -1,12 +1,12 @@
var d = "Double quoted string\n";
-print(d);
+console.log(d);
var s = 'Single quoted string\n';
-print(s)
+console.log(s)
var e = "Escaped characters \b \f \n \r \t \v \' \" \\ \n";
-print(e)
+console.log(e)
var u = "Unterminated string
this is not possible in js\n";
-print(u);
+console.log(u);
var u2 = 'This is neither\n
-print(u2);
+console.log(u2);
diff --git a/Base/home/anon/js/type-play.js b/Base/home/anon/js/type-play.js
index 038841397c..a9a8bb3d53 100644
--- a/Base/home/anon/js/type-play.js
+++ b/Base/home/anon/js/type-play.js
@@ -1,12 +1,12 @@
const object = {};
-print(true == 1);
-print(null == undefined);
-print("12" == 12);
-print(1 + "12");
-print(12 / "12" == true);
-print(2 * "12");
-print(~"24");
-print(~true);
-print(2*2 + "4");
-print(object == "[object Object]");
+console.log(true == 1);
+console.log(null == undefined);
+console.log("12" == 12);
+console.log(1 + "12");
+console.log(12 / "12" == true);
+console.log(2 * "12");
+console.log(~"24");
+console.log(~true);
+console.log(2*2 + "4");
+console.log(object == "[object Object]");