Skip to content

Instantly share code, notes, and snippets.

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

Andre Santiago runandrerun

🏠
Working from home
View GitHub Profile
@runandrerun
runandrerun / questions.js
Created November 12, 2018 19:27
Questions
// JavaScript
// Question #1
strangeSequence = (num) => {
let numbers = []
let count = 1
while (numbers.indexOf(num) === -1) {
count++
numbers.push(num)
// JavaScript
// Question #1
strangeSequence = (num) => {
let numbers = []
let count = 1
while (numbers.indexOf(num) === -1) {
count++
numbers.push(num)
@runandrerun
runandrerun / questions.js
Created November 12, 2018 19:24
Question
// JavaScript
// Question #1
strangeSequence = (num) => {
let numbers = []
let count = 1
while (numbers.indexOf(num) === -1) {
count++
numbers.push(num)
@runandrerun
runandrerun / questions.js
Created November 12, 2018 19:16
Questions
// JavaScript
strangeSequence = (num) => {
let numbers = []
let count = 1
while (numbers.indexOf(num) === -1) {
count++
numbers.push(num)
num = ("" + num).split("").map(num => num * num).reduce((a, b) => a + b)
}
// JavaScript
strangeSequence = (num) => {
let numbers = []
let count = 1
while (numbers.indexOf(num) === -1) {
count++
numbers.push(num)
num = ("" + num).split("").map(num => num * num).reduce((a, b) => a + b)
}