Skip to content

Instantly share code, notes, and snippets.

View ma-9's full-sized avatar
🌏
Building Tech for good 😊

Manav Oza ma-9

🌏
Building Tech for good 😊
View GitHub Profile
@ma-9
ma-9 / vscode_shortcuts.md
Created November 1, 2019 18:15 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

Official List of all commands

Open/View

@ma-9
ma-9 / exponentiation.js
Last active November 1, 2019 18:24
JavaScript ES8 Features
// Exponentiation
Math.pow(2,3);
console.log(2 ** 3);
@ma-9
ma-9 / trailingCommas
Created November 1, 2019 18:25
JavaScript ES8 Features
// Trailing Commas
const Students = {
first: '1',
second: '2',
third: '3',
}
const Student = [1,,2,,3,,,];
@ma-9
ma-9 / setMethod.js
Created November 1, 2019 18:27
JavaScript ES8 Features (MAP & SET)
// MAP and SET method of array in JavaScript
// Set removes all duplicate elements from the array
const array = [1,2,3,4,5,5,5,1,1,2,4,2,6,3,7];
const setArray = new Set(array);
// console.log(setArray);
const uniqueArray = [...setArray];
@ma-9
ma-9 / valuesAndEntries.js
Created November 1, 2019 18:28
JavaScript ES8 Features (Object.values and Object.entries)
// Object Values and Object Entries
const Employes = {
name: 'Manav',
age: '21',
contact: ['9662260013','manavoza7@gmail.com'],
callme: function(){
return this.name + this.age;
}
}
@ma-9
ma-9 / stringPadding.js
Created November 1, 2019 18:29
JavaScript ES8 Features (padStart and padEnd)
// padStart and padEnd
const String = '12345678';
// padStart will add string/padding at the start to justify the Required Length
console.log(String.padStart(10,'.'));
// Output :- ..12345678
// padEnd will add string/padding at the end to justify the Required Length
console.log(String.padEnd(10,'.'));
// Output :- 12345678..
@ma-9
ma-9 / codeFormatter.md
Last active November 1, 2019 18:56
Learn How to Format the Code

Learn How to Format the Code in Visual Studio Code

  • Install the Prettier from extentions
  • Open you code
  • Then Press On Windows Shift + Alt + F On Mac Shift + Option + F
    On Ubuntu Ctrl + Shift + I
  • Thats it..
@ma-9
ma-9 / 365CodingPhaseChallenge.md
Last active December 23, 2019 13:50
365CodingPhaseChallenge

365 CodingPhaseChallenge

Hello Everyone My name is Manav Oza and I'm going to complete this 365CodingPhaseChallenge

This Gist will daily uploads my coding acitivity

@ma-9
ma-9 / date.js
Created November 4, 2019 07:45
Get Date in dd//mm/yyyy format
const myDate = new Date().getUTCDate();
const myMonth = new Date().getUTCMonth()+1;
const myYear = new Date().getUTCFullYear();
const date = myDate.toString()
const month = myMonth.toString()
const year = myYear.toString()
console.log(date + "-" + month + "-" + year)
@ma-9
ma-9 / mimetype.js
Created November 4, 2019 07:49
Get extension from req.file (Uploaded File)
file.mimetype.substr(6)