Skip to content

Instantly share code, notes, and snippets.

View dbsimeonov's full-sized avatar
:octocat:
Life begins at the end of your comfort zone.

Daniel Simeonov dbsimeonov

:octocat:
Life begins at the end of your comfort zone.
View GitHub Profile
@dbsimeonov
dbsimeonov / media-queries.scss
Created February 7, 2018 23:51 — forked from chrisjlee/media-queries.scss
All Media Queries breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@dbsimeonov
dbsimeonov / Methods and Functions.md
Last active January 17, 2018 15:31
Here I will share all of my notes for methods/functions/syntaxes/reference etc..

Splice vs Slice

Using .splice(); - When you use splice you are modify/editing the array - deleteCount is how many indexes you want to remove - itemN is if you want to replace the index with different content

*Syntax array.splice(start[, deleteCount[, item1[, item2[, ...]]]])

Using .slice();

@dbsimeonov
dbsimeonov / Chunky Monkey.md
Last active January 17, 2018 15:45
Here I will post the solutions for the challenges from Free Code Camp. I will try to explain all of them with comments and steps for solving the task. Most of them will try to use different approaches/methods for solving them. Please if you feel there is a better way, share it with us!

Chunky Monkey

For loop + push().slice()

  • Creating an empty array
  • For loop which on each irretation will add the value of size
  • push the content from i to i + size into the result array
function chunkArrayInGroups(arr, size) {
 var result =[];