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
function doubleNum (number) { | |
var string = number.toString(); | |
var length = string.length; | |
var left = string.substr(0, length / 2); | |
var right = string.substr(length / 2, length); | |
if (left === right) { return number; } | |
return number * 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
"use strict"; | |
var events = Symbol("events"); | |
function MyObserver () { | |
this[events] = {}; | |
} | |
MyObserver.prototype = {}; |
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
let brackets = { | |
"[": "]", | |
"{": "}", | |
"(": ")", | |
"<": ">" | |
} | |
function correctBrackets (str) { | |
const vals = Object.keys(brackets).map(key => brackets[key]); | |
const keys = Object.keys(brackets); |
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
function greatestCommonPrimeDivisor(a, b) { | |
var aCPDs = getCPDs(a); | |
var bCPDs = getCPDs(b); | |
var max = -1; | |
for (var i = 0; i < aCPDs.length; i++) { | |
for (var j = 0; j < bCPDs.length; j++) { | |
if (aCPDs[i] === bCPDs[j] && max < aCPDs[i]) { | |
max = aCPDs[i]; | |
} |
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
"use strict"; | |
let path = require('path'); | |
let args = require('yargs').argv; | |
let webpack = require('webpack'); | |
let HtmlWebpackPlugin = require('html-webpack-plugin'); | |
let ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
let CopyWebpackPlugin = require('copy-webpack-plugin'); | |
const PATH_DIST = path.join(__dirname, 'dist'); |
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
'use strict' | |
$(function() { | |
function Quotes() { | |
var self = this; | |
self.wrapperObj = $('.wrapper'); | |
self.newQuoteButton = $('.getNewQuote'); | |
self.socialButton = $('.social-buttons__item'); | |
self.quoteContainer = $('.quoteContainer'); | |
self.authorContainer = $('.authorContainer'); | |
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
'use strict'; | |
let path = require('path'); | |
let args = require('yargs').argv; | |
let webpack = require('webpack'); | |
let HtmlWebpackPlugin = require('html-webpack-plugin'); | |
let ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
let StyleLintPlugin = require('stylelint-webpack-plugin'); | |
let ImageminPlugin = require('imagemin-webpack-plugin').default; | |
let autoprefixer = require('autoprefixer'); |
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
{"lastUpload":"2020-10-14T08:34:27.145Z","extensionVersion":"v3.4.3"} |
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
function zoom(n) { | |
const length = n % 2 ? n : n - 1; | |
const center = (length - 1) / 2; | |
if (length < 0) { | |
return ''; | |
} | |
function getSquare(square, level, symbol) { | |
if (level * 2 > length) { |
OlderNewer