About: full-stack software engineer
This API connects to an interactive front-end built with React.js. When pasting a url link of a website, it renders a shortened link --- shareable across various social media websites posts API: https://backend-microservice-urlshortener.onrender.com/
Tech: MongoDB, Mongoose, Node.js, Restful API, React.js, JavaScript/HTML/CSS, Express, JSON
Fullstack App: https://frontend-microservice-urlshortnener.onrender.com/
function areaOfCountry(name, area) {
// earths landmass = 148,940,000
let countrysProportionToEarthLandMass = area / 148940000
let decimalTruncate = countrysProportionToEarthLandMass.toFixed(4)
let crops = Number.parseFloat(decimalTruncate) * 100
if (crops > 1) {
return `${name} is ${crops}% of the total world's landmass`
} else if (crops < 1) {
return `${name} is ${crops.toFixed(2)}% of the total world's landmass`
}
}
console.log(areaOfCountry("Ireland", 32595));
console.log(areaOfCountry("Switzerland", 41284));
console.log(areaOfCountry("Netherlands", 41850));
console.log(areaOfCountry("Greece", 131990));
console.log(areaOfCountry("Sweden", 204035));
function accountsReceivableAndPayable(cents, amountDue) {
const initialValue = 0;
const twenty = 20.00 cents[0]
const ten = 10.00 * cents[1]
const dollar = 1.00 * cents[2]
const quarter = .25 * cents[3]
const dime = .10 * cents[4]
const nickel = .05 * cents[5]
const penny = .01 * cents[6]
let cents = [twenty, ten, dollar, quarter, dime, nickel, penny]
const loopAdd = cents.reduce((elementFir, elementSec) => elementFir + elementSec, initialValue);
return loopAdd >= amountDue ? true : false
}
console.log("cent calc [8, 10, 50, 100], 5.00] = ", accountsReceivableAndPayable([8, 10, 50, 100], 5.00))
console.log("cent calc [8, 10, 50, 100], 55.00] = ", accountsReceivableAndPayable([8, 10, 50, 100], 55.00))
function cummulativeBudgets(arr) {
let budgetCummulative = 0
arr.forEach(array => {
for (let digit in array) {
if (digit === "budget") {
budgetCummulative += array[digit]
return budgetCummulative
}
}
})
return budgetCummulative
}
function maskify(str) {
const strSplit = str.split('')
const strSlice = strSplit.slice(-4)
const strSliceJoin = strSlice.join('')
const stor = []
for (let i = 0; i < strSplit.length - 4; i++) {
strSplit[i] = '#'
stor.push(strSplit[i])
}
const eleJoin = stor.concat(strSliceJoin)
const strFilter = eleJoin.filter((element) => element !== ',')
const stringify = strFilter.toString()
const stringifyJoin = stringify.split('').join('')
return stringifyJoin.replace(/,/g, "")
}