cl('testing') //-> console logs ('testing')quickFetch(yourUrl, function(data){cl(data)})
//-> fetches and .then console logs the data sent from the APIuserLocation(function(lat, lon){
cl(lat);
cl(lon);
})
//-> Grabs user location, the latitude and longitude are passed as two parameters into your functiontoCity(lat, lon, (data)=>{
cl(data);
});
//-> console logs the location's data based on the longitude and latitude provided_(‘string’).reverseString() //-> returns ‘gnirts’_([1,1,2,2,2]).removeRepeats() //-> returns [1,2]_([4,3,2,1]).sortArray() //-> returns [1,2,3,4]_([4,3,2,1]).bubbleSort() //-> returns [1,2,3,4]_(true).type() //-> returns boolean_(5).for(function(i){}) //-> loops 5 times_([1,2,3,4,5,6,'a']).forEach(function(i){}) //-> loops through 7 times
_([12,95,34,6,88]).randomChar() //-> returns a random character from the array/string_(myVariable).toLocalStorage(key)_().getLocalStorage(key)_(2).isEqualTo('2') //-> returns 'Equal in value, but not type.'
_(100).isEven() //-> returns true
el('h1').html() //-> returns <h1>test<h1>el('#myId').hide()el('.myClass').show() //-> Displays element as 'block'
el('#mainContainer').showFlex() //-> Displays element as 'flex'
el('textarea').showInline() //-> Displays element as 'inline-block'el('#divWrapper').setAttributes({'title': 'testing', 'style:' 'background: red', 'data-test': '5'})el('div').clear()el('input').setId('mainTextField')el('.myTextArea').dynamicTextArea()el('button').onhold(100, ()=> {
console.log('test')
})
// console logs 'test' every 100ms as long as the user is holding down on the buttonel('#description').text('hello world')