170 days and counting

Categories: Development, Education

Initially, I planned to do one commit a day for at least 100 consecutive days. Well, that was 170 days ago and I’m still creating at least one commit a day. As you can see on the chart above, recently I haven’t built much “skyscrapers”, thus, it’s about time to create another section of high-rising towers. 😁

Codewars: Find the unique number 👨‍💻

Categories: Education

A while ago, I signed up at https://www.codewars.com/ to practice both my PHP and JS skills. I decided to publish my results and to compare them with the best practice solution if found, thus, here we go.

Task:

Given an array with at least three numbers.All numbers are equal except one.Find the unique numer.

My solution:

View this gist on GitHub

Best practice:

View this gist on GitHub

Resources:

sortrsortendcurrent

Sunda Kelapa Harbour and Fatahillah Square Jakarta

Categories: Education

Today, Devin and I are celebrating our first wedding anniversary. As we’re both free today, we went to Sunda Kelapa Harbour and Fatahillah Square. Now, we’re reflecting the previous year and contemplating our future at Cafe Batavia.

JavaScript30 – Day 18

Categories: Education

In today’s exercise, I learned how to fetch all video lengths from a site and calculate the total duration of all videos. The exercise was mainly based on the functions map() and ​​reduce(). The final code can be found on Day 18 – Adding Up Times with Reduce.
Resources:

Array.from()
Array.prototype.map()
Array.prototype.reduce()
Math.floor()

 

JavaScript30 – Day 17

Categories: Education

Another day, another exercise. Today, how to sort arrays without while ignoring the articles of the corresponding title. The exercise required a combination of replacing, sorting and mapping and the final code can be found on Day 17 – Sort Without Articles.
Resources:

Array.prototype.join()
Array.prototype.map()
Array.prototype.sort()
String.prototype.replace()
String.prototype.trim()

JavaScript30 – Day 15.5

Categories: Education

Seems I was too focused on https://javascriptforwp.com/courses/bootcamp-jan-march-2019/ today. Just realized that I need to leave the hotel and won’t have time to take care of my daily exercises of https://javascript30.com today. Am I regretting this? Well, a bit. But I learned a lot about DOM handling today. And, on a side note, I got my VITAS in Singapore, which is the first step towards my KITAS and KITAP. Thus, it had been a successful and valuable day after all.

JavaScript30 – Day 15

Categories: Education

Today’s lesson covered the secrets of using local storage. I learned how to create a small restaurant booking system, that stores the ordered dishes in the browser’s local storage. The final code can be found on Day 15 – LocalStorage.
Resources:

Document.querySelector()
Element.matches()
Event.preventDefault()
EventTarget.addEventListener()
JSON.parse()
JSON.stringify()
localStorage.getItem()
Storage.setItem()