Skip to content

Instantly share code, notes, and snippets.

View yaltha's full-sized avatar
🎨
Learn, learn, learn

yaltha yaltha

🎨
Learn, learn, learn
View GitHub Profile
@yaltha
yaltha / linebreak.md
Created March 17, 2021 12:38
Line breaks in markdown
Hello  (<-- two spaces)
World

Hello
World


@yaltha
yaltha / my-git-command.md
Last active January 19, 2021 09:52
My mostly used git command

My mostly used git command

What is Git?

As I understand, git is a useful system that I used to control version control of changes on your coding.

Version control is required in developing a software

Git is useful and powerful version control that I have been known and used so far.

Here are some of git command that moslty I used:

1. Init

@yaltha
yaltha / ways-looping-arrays.js
Last active January 13, 2021 11:34
Some ways to loop one or more arrays in JS
//given an array
const prices = [12, 50, 223, 59, 30]
//1. FOR , the old shcool way
for (let i = 0 ; i < prices.lenght ; i++) {
//process here
console.log(prices[i]);
}
//2. WHILE
@yaltha
yaltha / spread-operator.js
Last active January 6, 2021 19:18
Spread Operator - ES6 - JavaScript
//So, spread operator (...) is mainly used to combine (concatenate) multiple arrays or objects in javascript.
//here are some arrays
const yearsOne = [2010,2015,2020,2025,2030];
const yearsTwo = [2013,2017,2022,2027,2032];
//first way, simply combined them in an array, separated by a comma
const combinedYears = [...yearsOne, ...yearsTwo];
console.log(combinedYears)
//output: [2010, 2015, 2020, 2025, 2030, 2013, 2017, 2022, 2027, 2032]