mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:25:10 +00:00
LibJS: Replace the global print() function with console.log() :^)
This commit is contained in:
parent
19452230cd
commit
086f68e878
10 changed files with 109 additions and 25 deletions
|
@ -1,2 +1,2 @@
|
|||
var foo = "foobar";
|
||||
print(foo.charAt(3));
|
||||
console.log(foo.charAt(3));
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
var x = "foobar";
|
||||
print(x.hasOwnProperty("length"));
|
||||
console.log(x.hasOwnProperty("length"));
|
||||
|
|
|
@ -1 +1 @@
|
|||
print("Hello friends!")
|
||||
console.log("Hello friends!")
|
||||
|
|
|
@ -8,4 +8,4 @@ function foo() {
|
|||
return y;
|
||||
}
|
||||
|
||||
print(foo());
|
||||
console.log(foo());
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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]");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue