Skip to content

Instantly share code, notes, and snippets.

View alex-hladun's full-sized avatar
🏠
Working from home

Alex Hladun alex-hladun

🏠
Working from home
  • Accolite Digital
  • Calgary
View GitHub Profile
@alex-hladun
alex-hladun / pigLatin.js
Created May 25, 2020 23:06
Creates a pig latin representation of a string using node command-line arguments.
const args = process.argv.slice(2);
let str = "";
for (let i = 0; i <= args.length - 1; i++) {
let phrase = "";
let firstLetter = "";
for (let j = 0; j <= args[i].length - 1; j++) {
if (j === 0) {
firstLetter = args[i][0];
} else {