Day 16 of learning JavaScript: truthy & falsyHello, today we will fix a problem in the Chrome extension. The stored leads aren't getting displayed when we refresh the page. So how we want the extension to work is: If the local storage is empty, nothing will happen. If the local storage contains...Sep 10, 2023·2 min read
Day 11 of learning JavaScript: Objects and logical operatorsToday I finished the blackjack app and I also learned two new fundamental things in JavaScript. First, I have learned about logical operators. "&&" stands for "and" and "||" stands for or. I applied this to the Blackjack app so that we can only trigg...Jul 3, 2023·4 min read
Day 10 of learning JavaScript: Generate random numbers and random cardsToday I learned how to generate random numbers in JavaScript. I needed to know this so that when every round of Blackjack starts, the numbers are not the same but always different. There are a few important things I have learned: Math.random() // cre...Jul 1, 2023·3 min read
Day 9 of learning JavaScript: for-loops and return valueToday I learned about for-loops and also how to return a value. A for-loop is used to repeat a specific block of code a known number of times: for(let i = 0; i<array.length; i++){//i++ is the same as i += 1 // initialisation, condition, iteration } ...Jun 30, 2023·2 min read
Day 8 of learning JavaScript: Arrays and changes at the gameToday, the first thing I learned was something that counts overall. There is a better way to select an HTML element than document.getElementById(): // old way document.getElementById("id") //new way document.querySelector("#id") //it's better, becau...Jun 26, 2023·4 min read
Day 7 of learning JavaScript: Start Button and SumToday I did a few things on the Blackjack app project. At first, I made the start button display, work and also look good. It was also a very good revision of many things that I have learned so far. I created the button in HTML and told the document ...Jun 25, 2023·3 min read
Day 6 of learning JavaScript: Blackjack appToday I started a new project after finishing the People Counter app last time. The app I want to create is called Blackjack. It's a very popular casino game and it works like that: You get 2 cards. If the sum of all cards is under 21, you are still ...Jun 20, 2023·4 min read