# Today I wrote my first JavaScript program

Warm Merry Christmas to You.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1671977605337/0fe81193-5e93-4b1a-b01d-b82a024c1e24.jpeg align="center")

I started learning JavaScript two days back. I am referring to this awesome [resource](https://www.youtube.com/watch?v=KGkiIBTq0y0&t=14487s) by Vinod Bahadur Thapa, founder of Technical Thapa YouTube channel. It's a complete hands-on course on JavaScript.

%[https://www.youtube.com/watch?v=KGkiIBTq0y0&t=14487s] 

Till now I have studied and am assimilating the basics of JavaScript syntax like displaying an output, operators, initialization, functions, function expressions, anonymous function, control flow statements, if-else shorthand method, ECMAScript features, etc.

It's syntax is extremely similar with C,C++ and Java.

I'm approaching learning JavaScript and any other language (presently HTML,CSS with a view to understand the MERN stack and a bit of Python) in a way so as to build and sharpen **programming logic**, which is fun. Yes, many languages at a time but I am managing my learning journey in such a way so as to not feel overwhelmed. One more element of my learning approach is to understand the entire high-level overview first. I love the **top-down** approach and not bottom-up. I'm learning stuff in a time-bound way, not rigid however, so as to work in an excellent, generous, loving, international remote culture. Ofcourse a great pay is what I'm developing myself for, like everyone but I'm training myself more to enjoy **problem-solving**, increasing **depth of skill** (credits:@[Tanay Pratap](@tanaypratap)), creating a **portfolio of useful projects** which hold meaning to me as well as to the company and having **fun** big time! An excellent pay must become a sure by-product. One more insight popped up in my journey, which is to prepare **interview-readiness-fully**! An interview involves answering conceptual questions, solving coding problems live and showcasing projects

### Key points:

* Having fun!
    
* Preparing interview-readiness-fully
    
* Gaining a high-level overview first, the top-down way
    
* Build and sharpen programming logic
    
* Having fun solving problems
    
* Building depth of skill
    
* Creating a portfolio of useful projects
    

In this program, I tested my understanding of switch-case-break control flow to solve a problem on multiplication tables. The switch statement takes the input and launches a programming logic corresponding to each case statement (the varying values of a variable), in this case specific multiplication tables. Let me illustrate very simply and playfully:

### Illustration

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1671972303581/5d153c70-dda5-4af8-ae36-5510e5fb12e5.png align="center")

Each input is likened to a colour and when that input is passed to the switch statement, it launches the multiplication table for-loop for the specific number input and then breaks out of the switch-case logic.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1671972392285/a9942f76-42bb-4d6a-a293-c0e3f96e60ec.png align="center")

The syntax is as follows:

```javascript
switch(expression)
{
    case some_thing:
              run some_code;
              break;
    case some_other_thing:
              run some_other_code;
              break;
}  
```

Please pardon and educate me if I have any flaw in the above text, code and illustration work.

### Conclusion

That's it for this blog post. I will come up with more content onwards in this journey. Thanks for reading through. I hope You enjoyed reading as much as I enjoyed creating this piece of work!

You can view my growing repository here:

Github: [https://github.com/Tirtharaj-888/diy-code](https://github.com/Tirtharaj-888/diy-code)
