var arr = [[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]];
var maxarr = arr.map(function(c){
return Math.max.apply(null, c);
});
alert(maxarr );//[27,5,39,1001]
<a href="http:/google.com" data-href2="https://translate.google.com/">Click</a>
var els = document.querySelectorAll("a");
for(var i = 0; i < els.length;i++)
els[i].addEventListener("click",function(){if(this.getAttribute("data-href2"))window.open(this.getAttribute("data-href2"));},false)
var str ="01 01:00 02:00 03:00 04:00 05:00 \n02 01:00 02:00 03:00 04:00 05:00\n03 01:00 02:00 03:00 04:00 05:00\n04 01:00 02:00 03:00 04:00 05:00 \n05 01:00 02:00 03:00 04:00 05:00";
if(str.match(/^(\d{1,2}\s+(\d{1,2}\:\d{1,2}\s+){4}\d{1,2}\:\d{1,2}(\s?)+)+$/m)[0] != str)
console.log("проверка прошла неудачно");
else
console.log("проверка прошла удачно")
var str = "32test-text1";
if(str.search(/^[a-zA-Z\d]+(-?[a-zA-Z\d]+)?$/gi) != -1)
alert("Is valid");
else
alert("No valid");