jss
titterid
tui.calcal
el.style.display=inline (default)style
only vals : for(k in h) if(h.hasOwnProperty(k)) i.cl(h[k])obj
el.remove()el
kontrajsgame
gr[j].style.setProperty("--size","calc("+val[j]+"/300)")css
let ar=Array.from(fd)fd
sel.sort( (a,b)=>b.val-a.val)ar
let unixTs=Math.round(d/1000 )date
let a1=[...str1]; convert str to cha arar
import ini from "./ini.js"es6
set -> arr: const set = new Set([1, 2, 3]); let ar=[...set]ar
if(chd[j].tagName=="A") cl(chd[j])dom
ar[j]=Object.assign({},po2,{x:j*192,y:0*144})obj
if(/thumb.jpg/.exec(img[j]))im2.push(img[j].slice(21) )regex
indexOF obj arar
ra4=[...ra3].sort() ar
loa.sort( ()=>Math.random()-0.5)arr
string1.localeCompare(string2)str
if(nar.indexOf(u[j].nam)===-1)nar.push(u[j].nam); uniq arrayar
lettext
const arr3 = [...arr1, ...arr2];ar
kanji tableutf
let str=inam.value+"\u3042"utf
joyo kanji - csvutf
jap hira, katautf
date 1 to 01 : if(m.length==1)M=0+Mdate
let d=new Date(ts).toLocaleString() -> locale timedate
let tim=new Date().getTime() == Date.now() -> timestampdate
let d2=new Date(tim-loc)date
boo=sp.includes(com)arr
Math.log10(100)=2math
d.toString() -> Sat Jan 14 2023 14:34:57 GMT+0900 (Japan Standard Time)date
new Date().valueOf() .==. Date.now() .==. + new Date()date
tn*Math.pow(10,12)math
jq
if (0 === Object.keys(obj).length) { ... }obj
closure timerclosure
animate() -> velocity()jq
grunt custom:-ajax, -effectsjq
create new el : $( "

My new text

" ).appendTo( "body" );
jq
window.history.replaceState( null, null, window.location.href );window
for(p in sess){if(sess.hasOwnProperty(p))}obj
classes:{"ui-tooltip":"bg-lg"},jq-ui
var biD = function(id) {return document.getElementById( id ); }; js shorthandjs
mis-man jq cdromtut
import $ from "jquery";react
fetch > $.ajaxjq
#id1 > :eq(0)jq
:first == :eq(0)jq
$.fn.greenify = function() { this.css( "color", "green" ); }; $( "a" ).greenify();jq
row.append("
"); append element
element
document.createElement("div") > $("body").append("
")
element
$("#col1").after("
")
after
nFilter.style.width='330px'; add style using jsstyle
var img=$("")jq
document.createElement("script") > $("body").append("")el
var scr=document.createElement("script")el
google js sign-inapi
js fb loginapi
twit loginapi
git clone https://github.com/jquery/jquery-uijqui
$("p").eq(0).css("top")filter
$(window).resize()event
dl oreillytut
js-enlightmenttut
window.location.replace("http://stackoverflow.com");window
err obj: name,message, stackerr
hoisting(pull up); declare(O), init(X)hoist
remove null from array; fav2=fav.filter(Boolean)array
if(!$("#chk").is(':checked')){ do stuff}jq
var filtered = array.filter(Boolean);filter
remove dup: [...new Set(arr)]array
show elements in objobj
var mes={ tx:"mes" }; module.exports=mes;module
simple jq: $(fun)jq
$(document).ready(func) == $(func)jq
closure - use global var as privateclosure
i++ == postfix unary opop
+ == shortcut for Number(unary op)number
var n = d.getUTCDate();var m=d.getMonth()date
undefined=="value is not assigned"obj
single quote === double quote; var bt=`include ${str}`string
number to stringstring
$(document).ready(function(){}) -> $(function(){})jq
Object.keys(obj).length === 0; is obj emp?obj
reduce; var res=sum.reduce(function(tot,num){return tot+num},0)array
reduce array in loop; for ( var i = 0; i < numbers.length; i++ ){ total += numbers[i]; }array
json array; [{"key1":"val1"},{"key2":"val2"}]json
var ex={ get:function(){ str="my str"; return str}; module.exports=exmodule
arr.pop()array
$(location).attr("host")jquery
object.style.position("static") - X; use setAttribute("style","postition:static")style
min modal - modal,modal-dialog, modal-contentmodal
SyntaxError Unexpected token exportpopper
document.body.appendChild(myDialog) modal
array.slice(-1)[0]array
console.dir(myArray, {'maxArrayLength': null})console
var myArr = Array.from("ABCDEFG");array
(async ()=> {})();async
you-might-not-need-jqueryjq
str.replace(/\r?\n/g, "");replace
offset val for Asia/Tokyo is 12 hoursdate
var d = new Date(2018, 11, 24);date
scrollTop - codepenjq
const res=arr.splice(2,1);array
"module.exports=app" == "export module app"export
jsx --executable web --output js"$se"js $1jsx
npm i -g jsxjsx
function isEmpty(obj)obj
redmonk > tiobejs
calling func from other filefunc
var xhr = new XMLHttpRequest();xhr
videojs cdnvideo
var patt1 = /\bW3/g;regex
6 primitive types: string, bool, null, undefined, number type
your first pwapwa
Math.ceil(num); Math.floor(num); Math.round(num);math
async function main() { }; main();asynch
js array err - mid bad, end gooderr
obj loop; for (var i in p){ console.log(p[i]) }loop
onerror="this.src='http://localhost:3000/img/cd/no.png'"eve
You-Dont-Know-JS - up and goingtut
var jso=obj['*'] - json with asteriskjson
var utc = new Date().toJSON().slice(0,10).replace(/-/g,"/")date
highlight include ejsejs
arr.forEach(function(ite,index){ console.log(ite,index) }array
replace(/.$/,".") - replace last charreplace
var pat=/^\d{4}$/;regex
__dirname+"/../../../public/son/"+ email + '.js'__dirname
prettier --single-quote --trailing-comma es5 --write "{app,{routes,test,views}}/**/*.js"prettier
for(var i in obj){console.log(key,obj[key])obj
delete item from obj: delete obj.skuobj
Object.keys(bod).lengthobj
var dat0 = new Date(arr[0]*1000); Date(miliseconds)date
var num=parseInt(sku);int
var num=parseInteger(sku);integer
var ind=sku_a.indexOf(sku);array
window.location.replace("http://localhost:3000/ret");window
hbs - cdnhbs
met1.setAttribute("charset","UTF-8"); (X) not working!dom
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");xhttp
elm.appendChild( document.createTextNode( '\u00A0' ) ); - spacetext
document.head.id - (X)attr
var x = document.getElementsByTagName("META")[0]; element
var x = document.createElement("LINK");element
let = "block scope local variable"let
mjs https://github.com/pangloss/vim-javascriptmjs
Number.prototype.toLocaleString - , septoLocale
document.getElementById("head").innerHTML="\innerHTML
Math.pow(4, 3); - power of 3method
Math.random() ex1math
Thing > Organization > PerformingGroup > MusicGroup json
var val1= val.values[0];array
console.log(Array.isArray(val.values));array
data-main Entry Pointrequire
loading dbrequire
git clone https://github.com/kripken/sql.jssqlite
location.hreflocation
http://twitter.com/home?status=twi
reactjs tutreact
reactjs envreact
npm install -g cordovacor
dl phantomjsphantomjs
document.body=nulldom
createElement ex1dom
chang img with animate()jquery
$('#img0').attr("src");jquery
animate loopjquery