Skip to content

Instantly share code, notes, and snippets.

View mskt4a.js
console.log('ds')
var bodyNode = document.body || document.getElementsByTagName('body')[0];
var event = new CustomEvent('NAME', payload = { hello: '<body> tag double click' });
var clicked = 0;
bodyNode.addEventListener('click', function() {
clicked++;
if (clicked > 1) {
clicked = 0;
View mskt3d.js
var numbers = [4, 6, 7, 8, 34, 54, 5, 3, 63, 76];
function isPrime(num) {
for (var i = 2; i < num; i++)
if (num % i === 0) return false;
return num !== 1;
}
function isPrimeArray(anyArray) {
if (!anyArray.length)
View mskt3c_mskt.js
// mosquid_variant
var numbers = [10, 12, 5, 7, 14, 16, 11, 4]
function evenOdd() {
if (!this.length)
return null
var resp = {
odd: [],
even: []
View mskt3c.js
// ilko_variant
var arr = [4, 5, 3, 6, 7, 8, 34, 54, 63, 76, 56, 57, 67, 68, 2, 35, 46, 97];
var arr2 = [5, 6, 7];
var evenArr = [];
var oddArr = [];
function jopa(someArray, evenArrJopa, oddArrJopa) {
for (var key in someArray) {
if (someArray[key] % 2) {
View mskt3b.js
var obj = {
a: function(p) { console.log('obj function a ' + p) },
b: function(p) { console.log('obj function b ' + p) },
c: function(p) { console.log('obj this is function c'); return this.a(p) },
};
var obj2 = {
a: 'parametr a',
b: 'parametr b',
c: 'parametr c',
View mskt3a.js
var parametr = 'huy'
var obj = {
a: function(p) { console.log('function a ' + p) },
b: function(p) { console.log('function b ' + p) },
c: function(p) { console.log('this is function c'); return this.a(p) },
};
obj.a(parametr);
obj.b(parametr);
View node.js
var program = require('commander');
process.stdin.resume()
program
.version('0.1.1')
.option('-i, --input [name]', 'User input')
.parse(process.argv)
function dateHelloError(value) {
View scss.scss
/*
* ToTop
*/
.ui-to-top {
position: fixed;
right: 15px;
bottom: 15px;
z-index: 100;
width: $form-input-height;
View scss.scss
// Custom button variants
@mixin btn-variant($clr, $bg, $bd, $clr-hover, $bg-hover, $bd-hover) {
&,
&:focus {
color: $clr;
background-color: $bg;
border-color: $bd;
}
&:hover,
View scss.scss
/*
* Text styling
*/
// Text styles
.text-italic {
font-style: italic;
}
.text-normal {