Skip to content

Instantly share code, notes, and snippets.

View cyberbarbie's full-sized avatar
🏠
Working from home

Tae'lur Alexis cyberbarbie

🏠
Working from home
View GitHub Profile
@cyberbarbie
cyberbarbie / code-of-conduct.md
Last active May 22, 2020 05:51
Code of Conduct for cyberbarbie's playhouse

Welcome to cyberbarbie's playhouse!

In order to foster a welcoming and inclusive environment for everyone, we ask all members to read and agree to our Code of Conduct when joining. This Code of Conduct is a living document and will be updated from time to time as necessary. The current version can always be found here. All changes will be announced in the #announcements channel of our Discord server as they are made. Agreeing to the Code of Conduct implies that you will monitor these changes and revoke your agreement if and when you no longer agree.

Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual

@cyberbarbie
cyberbarbie / mutuals.js
Last active September 2, 2021 06:07
Find occurrences in 2 arrays & return an array of unique values
// Find & return common occurences in 2 arrays & return the unique values in a new array; if there are no common occurences between the 2 arrays, provide a response
let arr1 = ["Leila", "Fry", "Leila", "Bender"]
let arr2 = ["Leila", "Bender", "Fry", "Bailey"]
let commonFriends = []
// Iterate through 2 arrays & adds common values to empty list
findTheMutuals = (arr1, arr2) => {
for (let arr1Index = 0; arr1Index < arr1.length; arr1Index++){
@cyberbarbie
cyberbarbie / commonFriends.js
Last active September 4, 2021 07:17
Coding Challenge: Find Common Values in 2 Arrays
let friendsList1 = ["Monique", "Joe", "Levar", "Tylere", "Leann"]
let friendsList2 = ["Monique", "Joe", "Tyler", "Koa", "Leann"]
let commonFriends = []
// loop through 2 lists and add common values to empty array
let friendsMatch = (arr1, arr2) => {
for (friend1 = 0; friend1 < arr1.length; friend1++){
for (friend2 = 0; friend2 < arr2.length; friend2++){
@cyberbarbie
cyberbarbie / todos.js
Created September 4, 2021 02:11
JavaScript forEach() to iterate list & output value and index updated by 1
let todos = ["Sleep", "Eat", "Pray", "Love"]
// Use forEach() to loop through array and print current index:value
todos.forEach((value, index) => console.log(`${index+=1}: ${value}`))
// output:
/*
1: Sleep
2: Eat
3: Pray