- color: #ffffff
- background-color: #E753OB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basics": { | |
"name": "Shilpi Maurya", | |
"label": "Aspiring Front-end Developer", | |
"picture": "https://avatars1.githubusercontent.com/u/47273243?s=460&v=4", | |
"email": "meshilpi94@gmail.com", | |
"phone": "+91-9149235516", | |
"website": "", | |
"summary": "Eager to explore, experience and learn from the new challenges with the motive of growth", | |
"location": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Try edit message | |
// Object oriented prograaming: 4 principles | |
// 1. Encapsulation | |
// 2. Inheritance | |
// 3. Composition | |
// 4. Polymorphism | |
//encapsulation | |
class Rectangle { | |
constructor(length, width){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Calculator = { | |
add: (num1, num2) => { | |
return num1 + num2; | |
}, | |
sub: (num1, num2) => { | |
return num1 - num2; | |
}, | |
multiply: (num1, num2) => { | |
return num1 * num2; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Problem 1: fizzbuzzChallenge | |
// write a function that accepts a number and | |
// 1. returns a string "fizz" if it's divisible by 3, | |
// 2. returns string "buzz" if divisible by 5, | |
// 3. returns "fizzbuzz" of divisible by both 3 and 5 | |
// 4. Otherwise returns the input number (if above conditions are not matched) | |
const fizzbuzzChallenge = num => { | |
if (typeof num !== "number") { | |
return null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node.js CI | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-test-deploy: | |
runs-on: ubuntu-latest | |
steps: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Mock interview | |
//reverse sentence | |
const reverseSentence = str => { | |
if (typeof str !== "string" || !str.length) { | |
return null; | |
} | |
const smallStr = str | |
.toLowerCase() | |
.split("") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Weekly challenge | |
//Bracket Matcher | |
//Have the function BracketMatcher(str) take the str parameter being passed | |
//and return 1 if the brackets are correctly matched and each one is accounted | |
//for. Otherwise return 0. For example: if str is "(hello (world))", | |
//then the output should be 1, but if str is "((hello (world))" the | |
//the output should be 0 because the brackets do not correctly match up. | |
//Only "(" and ")" will be used as brackets. If str contains no brackets | |
//return 1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//20-10-2020 | |
//Where do i belong | |
const getIndex = (arr, num) => { | |
if (!Array.isArray(arr) || !arr.length || !Number.isFinite(num)) { | |
return null; | |
} | |
arr.push(num); | |
const newArr = arr.sort(); | |
const position = newArr.indexOf(num); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Algo | |
//for every closing type of bracket, there should be opening type of bracket | |
//No of every type of opening bracket should be equal to no of every type of | |
//closing bracket | |
const tripleBracketMatcher = str => { | |
let storage = []; | |
let perfect = { | |
"(": ")", | |
"[": "]", |
OlderNewer