Skip to content

Instantly share code, notes, and snippets.

View Mariana88's full-sized avatar

Mariana Casella dos Santos Mariana88

View GitHub Profile
@Mariana88
Mariana88 / Code Review - bottleManagement Object
Last active April 23, 2018 13:26
Please verify for: a) bug in addBottle - creating 2 bottles for Id 0, b) coherence of code structure. (functions drink and fill still untested/not finished)
let bottleManagement = {
bottles: {},
nextId: 0,
addBottle: function (totalVol, currentVol, liquid){
let Bottle = function (id, totalVol, currentVol, liquid){
this.id = id;
this.totalVol = totalVol;
this.currentVol = currentVol;
var app = {
db: {},
next_id: 0,
create: function(newThing) {
// this.db[this.next_id] = newThing;
// this.next_id ++;
if(newThing !== ''){
this.db[this.next_id] = newThing;
this.next_id ++;
console.log("THING WAS ADDED")
@Mariana88
Mariana88 / Objects-Mariana
Created April 12, 2018 11:43
Objects exercise - Is there a better way to determine if letter is a vowel than what I have done? (second for loop can be improved?)
function removeVowels (str){
let strNoVowels = "";
let strObject = {};
const vowels = {
v1: "a",
v2: "e",
v3: "i",
v4: "o",
v5: "u"
}