dailylog 3-12-20

less than 1 minute read

Things I did today!

  1. Woke up with the crazy kitties at 6:30
  2. Lazed in bed until 6:45
  3. Hopped on exercise bike until 7:15
  4. Showered until 7:20
  5. Ready by 7:30
  6. 750 Words “Dear Professor Fox I am not incompetent”
  7. ??
  8. Discovered old flask app
  9. Pushed flask app live here and did so using my old tutorial lololololol
  10. Decided to keep working on this flask app with titanic data
function makeDict(arr1, arr2){
// Make a dictionary
    d1 = {}
    d2 = {}
    for (var i = 0; i < arr1.length; i++){
        d1[arr1[i]] = 1
    }
    for (var i = 0; i < arr2.length; i++){
        d2[arr2[i]] = 1
    }
 
// Return dictionary
    return [d1, d2]

}

result = makeDict([2,3,4,5], [6,7,8,9])
console.log(result)
function makeDict(arr1, arr2){
// Make a dictionary
    d1 = {}
    d2 = {}
    for (let val of arr1){
        d1[val] = (d1[val] || 0) + 1
    }
    for (let val of arr2){
        d2[val] = (d2[val] || 0) + 1
    }
 
// Return dictionary
    return [d1, d2]

}

result = makeDict([2,3,4,5], [6,7,8,9,9,9])
console.log(result)

Tags:

Updated: