UglifyJS/demo.cola
Onoshko Dan 10db7a5ef4 Refactoring
step 1
2014-04-16 23:43:40 +07:00

32 lines
759 B
Plaintext

function main(){
console.log(`
Hello!
My name is ColaScript, and i know who you are }:->
@{navigator.userAgent}
`);
console.log("pow:", 5 ** 2, "; modulo:", 5 %% 3, ";");
var a = 3.14, b = 584;
a ?= b; console.log(a);
a = undefined;
a ?= b; console.log(a);
console.log(`is:`, location.href is String, `; isnt:`, 123 isnt Number, ";");
if(yes === true && on === true && no === false && off === false) console.log('Boolean alternatives');
console.log('Raw string:', r`@test \n \t \r`);
var isEmail = /
([\w-\.]+)
@
((?:[\w]+\.)+)
([a-zA-Z]{2,4})
/, email = r'danon0404@gmail.com';
console.log("@email is email:", isEmail.test(email));
}
main();