This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// mosquid_variant | |
var numbers = [10, 12, 5, 7, 14, 16, 11, 4] | |
function evenOdd() { | |
if (!this.length) | |
return null | |
var resp = { | |
odd: [], | |
even: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var program = require('commander'); | |
process.stdin.resume() | |
program | |
.version('0.1.1') | |
.option('-i, --input [name]', 'User input') | |
.parse(process.argv) | |
function dateHelloError(value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ToTop | |
*/ | |
.ui-to-top { | |
position: fixed; | |
right: 15px; | |
bottom: 15px; | |
z-index: 100; | |
width: $form-input-height; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Text styling | |
*/ | |
// Text styles | |
.text-italic { | |
font-style: italic; | |
} | |
.text-normal { |
NewerOlder