Code Library

Search code snippets and create your own

Choose language:

JavascriptCSS
Picture of codesnippet

About codesnippets

In the codesnippets you can find most important code snippents and examples for different coding languages. For example there Javascript, CSS, SQL and many more. All code snippets will have a expalantion on how it works and example code of its implementation and explanation on the code.

IF

Normal if statement that will check if the statement is true or not...

FOR

Loop trough array as long as the given rules have been reached...

MAP

Mapping trough an array to do action to every index...

RANDOM

Math.random() will create a random numbers. Best way to use it, is with Math.floor(). Example Math.f...

BOX-SHADOW

Box Shadow will give the div or other element a shadow...

SORT and REVERSE

sort() method will sort the array alphabetically. Reverse() method will sort the array in revers...

FILTER (for array)

The filter array method will create a new array with values that pass the check the filter method do...

REDUCE (for array)

The reduce method will run a function for each value and return single value in the end. From th...

EVERY (for array)

Every() method will check every item in array and all the items have to bass the given test in a fun...