DEV Community

Arif Iqbal
Arif Iqbal

Posted on • Updated on

Week 1 of 100DaysOfCode JavaScript Challenge

This week I publicly committed to the 100DaysOfCode challenge with JavaScript. I already have the basic knowledge and experience of JavaScript and jQuery and have been using it in my PHP projects for the last 10 years. But recently I got inspiration from the Alex Kallaway's coding challenge and decided to commit to it as an opportunity to take my skills to the next level.

As per the basic rule of the coding challenge, I will code for one hour everyday for the next 100 days, starting from Nov 22, 2021. To hold myself accountable, I committed to the challenge publicly on Twitter with the hashtag of 100DaysOfCode. I also post about my daily progress on Twitter everyday. My daily tweet includes a link to my Fork of the Alex Kallaway's 100DaysOfCode GitHub repository where I sum up my daily task. At the end of every week, on Sunday, I will write a recap of my week here on DEV.

In the first round of the challenge, I am planning to complete the FreeCodeCamp's JavaScript Algorithms and Data Structures Certification course. This is an interactive course where each lesson teaches you a JavaScript concept and then provides you with an in-browser coding challenge based on that concept. The course is composed of modules like Basic JavaScript, ES6, Regular Expressions, Data Structures and Algorithms, Functional programming, and Object Oriented Programming.

So, here is a recap of my first week.

Day 1: Nov 22, 2021. Monday

  • JavaScript Comments: Single line // Vs Multiline comments /**/. Use comments to document your code.
  • JavaScript Variables
    • Variable declaration
    • When JavaScript variables are declared, they have an initial value of undefined.
    • If you do a mathematical operation on an undefined variable your result will be NaN which means Not a Number
    • Variable initialization
    • Variable names can be made up of numbers, letters, and $ or _, but may not contain spaces or start with a number.
  • In JavaScript all variables and function names are case sensitive.
  • var vs let. The keyword let was introduced in introduced in ES6. Unlike var, when you use let, a variable with the same name can only be declared once.
  • Declare a Read-Only Variable with the const Keyword. The const keyword was also introduced in ES6.
  • Tweet

Day 2: Nov 23, 2021. Tuesday

  • Addition, Subtraction, Multiplication, and Division of two numbers in JavaScript.
  • Increment ++ and decrement -- operators
  • Operations on Decimal/Floating point numbers
  • Finding a remainder in JavaScript by the Remainder operator %
  • Compound Assignment With Augmented operations +=, -=, *=, /=
  • Escape Sequences in Strings, e.g. escape a single quote console.log('I\'m learning JavaScript')
  • String Concatenation (+ vs += operators)
  • Find the Length of a String in JavsScript .length
  • Tweet

Day 3: Nov 24, 2021. Wednesday

  • Strings in JavaScript: Bracket Notation, Zero-based indexing, String Immutability
  • Mad Libs style word game we're calling "Word Blanks". String concatenation.
  • Variable vs Array, Array declaration, Array Syntax
  • Nested or Multi-dimensional array
  • Accessing/modifying array elements: braket notation and zero based indexing
  • Access Multi-Dimensional Arrays With IndexesPassed
  • Manipulate Arrays With push(), pop(), shift(), and unshift().
  • Tweet

Day 4: Nov 25, 2021. Thursday

  • Write Reusable JavaScript with Functions
  • Function Parameters vs Arguments
  • Returning values from functions
  • Local vs Global Scope and Functions
  • Assignment with a return value
  • JavaScript array as Queue (FIFO) data structure
  • Boolean values in JavaScript
  • Use conditional logic with if statement
  • Operators = vs == vs ===
  • Type Coercion in JavaScript
  • Tweet

Day 5: Nov 26, 2021. Friday

  • The typeof operator
  • Inequality Operator != and the Strict Inequality Operator !==
  • Comparison with the operators >, >=, <, <=
  • Comparison with the Logical OR || and the Logical AND && operators
  • else and else if statements
  • Logical order in If Else statements
  • Chaining If Else statements
  • Tweet

Day 6: Nov 27, 2021. Saturday

  • Golf Code (exercise chaining If Else statements)
  • Switch statement
    • case values are tested with strict equality (===).
  • Adding a Default Option in Switch Statements
  • Multiple Identical Options in Switch Statements
  • Replacing If Else Chains with Switch
  • Returning Boolean Values from Functions
  • Return Early Pattern for Functions
  • Counting Cards game (exercise Switch Case statements)
  • Tweet

I hope you're also motivated about the challenge and join me soon in the challenge. Follow me on DEV and twitter to stay in touch.

~ Thank you

Discussion (0)