Have a Snippet?

Keep, track and share your code snippets with your friends

Shara


User Avatar

41

Location:
Website:
Has joined us: 11th May 2013, 15:52
Last visit: 1st June 2013, 07:26
Profile views: 324


JavaScript: Dumping tools and alias for development Share on Vkontakte

Use it for easy dumping variables
q() is alias for console.log()
w() is function, that displaying colorfull variable data like "var_export" to popup transparent div
based on this helpfull comment http://stackoverflow.com/a/7220510/2236189

Example: http://jsfiddle.net/ymmsA/
... Reveal Code


JavaScript: Declension of number (Склонение числительных) Share on Vkontakte

Example http://jsfiddle.net/v5nWh/ ... Reveal Code


JavaScript: Get random integer between min and max Share on Vkontakte

Get random integer between min and max ... Reveal Code


JavaScript: Get device pixel ratio (DPR) Share on Vkontakte

Returns pixel ratio based on devicePixelRatio or Media Query ... Reveal Code