Show information
console.log()
Variables
const, let
Type
console.log(typeof firstName); // string, number, boolean, underfined, null
Array
const cars = ['Mazda', 'Ford', 'BMW'];
for (let i=0; i<cars.length; i++)
{
console.log(cars[i]);
}
for (let car of cars)
{
console.log(car);
}
$_GET
$.urlParam = function(name){
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
if (results === null)
{
return 0;
}
else
{
return results[1];
}
}
// example.com?param1=name¶m2=&id=6
var name = $.urlParam('param1'); // name
Isset
if (($("#one").length > 0)){
alert('yes');
}
Pause
setTimeout(function(){
cenovaHladinaItem(ids);
}, 500);