Skip to content

Instantly share code, notes, and snippets.

View michellejanosi's full-sized avatar
:octocat:
Coding

Michelle Janosi michellejanosi

:octocat:
Coding
View GitHub Profile
// Write code that will go through each number from 1 to 100 and:
// For each number that is a multiple of 3, print "Fizz"
// For each number that is a multiple of 5, print "Buzz"
// For numbers which are a multiple of both 3 and 5, print "FizzBuzz"
// All other numbers should just print normally
for (let i = 1; i <= 100; i++) {
let output = ''; // This will hold the 'Fizz', 'Buzz', or 'FizzBuzz' string based on the conditions
if (i % 3 === 0) output += 'Fizz'; // If divisible by 3, we concatenate "Fizz" to output
@michellejanosi
michellejanosi / clients-and-servers.md
Last active June 8, 2020 21:53
An analogy between web clients and web servers

The client-server model operates kind of like a microbrewery.

In this microbrewery, your goal is to sell a high volume of beer to bars, liquor stores and supermarkets. You have a variety of customers that will make large orders every week or every month.

This means that customers will call your sales team or send an email every so often with a request. On the internet, this is known as a client.

On the other side of the equation, your brewery operations team exists so that it can brew beer that will meet the demands of the customers. In this situation, they are the server. That means that they await requests from clients, and use their

This was a paired project worked on by Renata Dickinson and Michelle Janosi.
Link to Github Repository: https://github.com/thinkful-ei-panda/quiz-app-michelle-renata
Live Link: https://thinkful-ei-panda.github.io/quiz-app-michelle-renata/
class LinkedListNode
attr_accessor :value, :next_node
def initialize(value, next_node=nil)
@value = value
@next_node = next_node
end
end
@michellejanosi
michellejanosi / hamming.rb
Created June 2, 2017 18:55
Hamming in Ruby
class Hamming
def self.compute(a, b)
raise ArgumentError if a.length != b.length
counter = 0
a.split('').each_with_index do |item, index|
if a[index] != b[index]
counter += 1
end
end