JSFiddle - React, Tailwind, and code Playground

by Ishank Dubey

JavaScript

let values = [-25, -50, -75, -100]
console.log(Math.max(...values, 0));


aFun(1,2,3);

function aFun(var1, ...arg){
console.log( (arg));
}

let value = [10,11];
console.log(Math.max.apply(null, value));

doAnotherThing();

function doAnotherThing() {
alert(this.name);
};


function MyObject(element) {
    this.name = element;
};

MyObject.prototype.onClick = function(e) {
     var t=this; 
     alert(t.name);
};


var aObj = new MyObject('test');
aObj.onClick();


function Math1(){
alert('Math');
}

Math1.staticProp = function(){
alert("static");
}

Math1.staticProp();