Skip to content

Instantly share code, notes, and snippets.

View Anna-Myzukina's full-sized avatar
💭
if you NEVER try } YOU`LL never KNOW

Anna Muzykina Anna-Myzukina

💭
if you NEVER try } YOU`LL never KNOW
View GitHub Profile
@Anna-Myzukina
Anna-Myzukina / chain.js
Last active September 3, 2018 12:02
Lolodash
//Exercise 5 [_.chain(value)]
/*We have a list of words that we want to modify.
['Test', 'Hello', 'World', 'Node', 'JavaScript']
We want to modify each word so that they are all appended with the word Chained, converted to uppercase, and sorted by alphabetical order. The result should look like this:
['HELLOCHAINED', 'JAVASCRIPTCHAINED', 'NODECHAINED', 'TESTCHAINED', 'WORLDCHAINED']
*/
@Anna-Myzukina
Anna-Myzukina / 2-balanceManager.js
Last active September 24, 2018 21:23
js-best-practices
//Exercise 2 Separation of Concerns 1
//Separation of Concerns Part 1
/*take the 4 methods and any variables that relate to
balance management and move them to balanceManager.js. Then, back in
vendingMachine.js, change the method of calling those functions from this
to our new balanceManager
*/
var balance = 0;
@Anna-Myzukina
Anna-Myzukina / exercise1.js
Last active August 31, 2018 09:18
Promise It Won’t Hurt
//Using setTimeout, print the string 'TIMED OUT!' after 300ms.
setTimeout(() => {
console.log('TIMED OUT!')
}, 300)
@Anna-Myzukina
Anna-Myzukina / 1-IDENTITY.js
Last active September 17, 2018 15:47
Cyrrying in js
function identity(args) {
return args;
}
module.exports = identity;
@Anna-Myzukina
Anna-Myzukina / 010.js
Last active August 28, 2018 17:52
planetproto
// -> Create an object called 'robot' using an object literal
// -> robot should have a property 'smart' with value true
var robot = {
smart: true
};
// -> Claim the result robot.smart
claim(robot.smart, true);
// ------------------------------------------------
var _ = require("lodash");
var worker = function(users) {
return _.where(users, {active: true});
};
module.exports = worker;
//Exercise 1
/*Scopes
The main type of scope in Javascript is Lexical Scoping. Present in the language
from the very beginning, this is the scope created within a function, and the
one most developers are familiar with.[1]
ES6 recently defined Block Scoping. This scope is created within curly braced
blocks.[2]
@Anna-Myzukina
Anna-Myzukina / scope.js
Last active August 23, 2018 20:41
node => my education
console.log("a: "+a+", b: "+b+", c: "+c);//a: 1, b: 5, c: 6
<?php
/**
* Plugin Name: Add taxonomy post type
* Description: Easy add new taxonomy to your post type
* Plugin URL: http://#
* Author: Musykuna Ann
* Author http://#
* Version: 1.0
*/
function create_taxonomy_to_cars() {
@Anna-Myzukina
Anna-Myzukina / accordion-widget.php
Created August 22, 2018 08:12
accordion-widget
<?php
/**
* Plugin Name: Accordion widget
* Description: Accordion widget
* Plugin URL: http://#
* Author: Musykuna Ann
* Author http://#
* Version: 1.0
*/
/**