<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: abhijeetekad</title>
    <description>The latest articles on DEV Community by abhijeetekad (@abhijeetekad).</description>
    <link>https://dev.to/abhijeetekad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F492600%2F2e414371-c0a9-4d34-a16c-703ba62a53fe.jpg</url>
      <title>DEV Community: abhijeetekad</title>
      <link>https://dev.to/abhijeetekad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhijeetekad"/>
    <language>en</language>
    <item>
      <title>2021 wrap up</title>
      <dc:creator>abhijeetekad</dc:creator>
      <pubDate>Sat, 01 Jan 2022 22:41:22 +0000</pubDate>
      <link>https://dev.to/abhijeetekad/2021-wrap-up-1g3a</link>
      <guid>https://dev.to/abhijeetekad/2021-wrap-up-1g3a</guid>
      <description>&lt;p&gt;For the past few days I have been reading many 2021 wraps on my feed so that made me think about what I did last year and to be honest, I don't remember doing anything special or any specific achievement. so I forced myself to write this blog because one thing I want to improve in the coming days is my writing and for that, there can not be any other best topic than this which I could think of right now so bear with me.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Quick introduction of me&lt;/code&gt;&lt;br&gt;
I am abhijeet currently in my 3rd year of graduation pursuing electronics and telecommunication engineering. In Varun Mayya's Avalon meta discord server I learn to make WordPress websites and after that, I found this programming, web development etc. interesting so now I am all in into this field.&lt;br&gt;
...&lt;br&gt;
so coming back to the heading of this blog what I did in 2021. so I have a very handsome answer as I am a student I attended online classes, did assignments, gave exams and many more but I will not talk about this in this blog because I know that all things mentioned above are lies and fake. so again I have nothing to answer what I did in 2021.&lt;/p&gt;

&lt;p&gt;so now I going month wise. In January if you remember everyone on the internet was talking about investing, the stock market and the crypto crash so I was consuming content regarding this only. so I opened accounts to buy stocks and crypto But I didn't have much money but I had this website &lt;a href="https://rohidasekad.com/" rel="noopener noreferrer"&gt;rohidasekad.com&lt;/a&gt; which has google AdSense approval. so I used to get some dollars per day. so I started working and creating more content on this website. I made quizzes for students, started uploading news posts regularly and all this was done in WordPress so you don't need any specific programming knowledge to build this. I got good engagement and I made around $560 in that 3 months then I stopped doing this because that was very time consuming and I learned mostly everything regarding elementor, google AdSense, google analytics, seo plugins etc&lt;/p&gt;

&lt;p&gt;so now I have money and as I said before as I was watching many YouTube videos regarding the stock market. so I put that money into the stock market and in crypto. from the very first I was clear that I will not put money in the stock market which is given by parents. so learn a few stock market concepts. bought many stocks at low sold on high made profit but still, I was not sure about that also because I had less money and watching everything daily is frustrating so in October I stopped doing that also. &lt;/p&gt;

&lt;p&gt;In the meantime one of my friend’s fathers asked me to make a website for his &lt;a href="https://scitesla.com/" rel="noopener noreferrer"&gt;compeny&lt;/a&gt; again I made that in WordPress this was my second project of this year.&lt;/p&gt;

&lt;p&gt;While doing all this I was learning JavaScript side by side. in September I started preparing for neogcamp. made 15 projects, wrote 2 blogs started attending Twitter spaces and I started liking this vibe. In November I gave an interview and got selected that is one achievement I guess.&lt;/p&gt;

&lt;p&gt;In December I got one more project from my friend's father. he is  fitness trainer he wanted to have a &lt;a href="(https://fitwell50.com/)"&gt;portfolio website&lt;/a&gt; so that was my 3rd project of this year again I am not super proud of this because of WordPress. &lt;/p&gt;

&lt;p&gt;I saw Varun Mayya and Tanay Pratap’s video &lt;a href="https://www.youtube.com/watch?v=hvc1FTbvbSE" rel="noopener noreferrer"&gt;Why Youngsters Should Not Invest Actively&lt;/a&gt; and I learned that all this time I was running behind money for a small percentage of gain. so decided to book all my profit from the stock market and use that amount to pay a fee of neogcamp.&lt;/p&gt;

&lt;p&gt;from last month I have started following the right people on Twitter, have started reading good books for ex. The almanack of ravikant, atomic habits. now the task is to make new connections with like-minded people, interact with more people on Twitter, complete neogcamp, get a good job and improve writing (this blog is a baby step).&lt;/p&gt;

&lt;p&gt;so now after writing this I still feel that I have done nothing and wasted so much time this year(which is true btw) if you are still reading this then feel free to add me on your Twitter feed&lt;br&gt;
&lt;a href="https://twitter.com/ekad_abhijeet" rel="noopener noreferrer"&gt;abhijeet Twitter&lt;/a&gt; &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Making MCQ quiz in JavaScript</title>
      <dc:creator>abhijeetekad</dc:creator>
      <pubDate>Wed, 25 Aug 2021 20:02:41 +0000</pubDate>
      <link>https://dev.to/abhijeetekad/making-mcq-quiz-in-javascript-22p4</link>
      <guid>https://dev.to/abhijeetekad/making-mcq-quiz-in-javascript-22p4</guid>
      <description>&lt;h2&gt;
  
  
  Hey there, Javascript developers 👩‍💻
&lt;/h2&gt;

&lt;p&gt;In this article, we are going to see how to make a simple quiz (MCQ) in javascript !!&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem Statement
&lt;/h3&gt;

&lt;p&gt;Prepare a Quiz and enable the user to play the quiz and calculate scores based on the answers chosen by the user.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack Used
&lt;/h2&gt;

&lt;p&gt;Html, CSS, and Javascript. This is beginner friendly application that any newbie can try to make the concept more clear and for good coding practice.&lt;/p&gt;

&lt;p&gt;okay, this sounds interesting but the question is where to start?&lt;/p&gt;

&lt;p&gt;I prefer to build the HTML part at first so that we can get an idea about the app which we are going to develop.&lt;/p&gt;

&lt;p&gt;then develop a javascript file to form logic around the application and to make sure that wiring between HTML file and javascript file is good for that you can do a dry run by using console log.&lt;/p&gt;

&lt;p&gt;and last I prefer to do css part because I am not good at css but you can do it simultaneously. so let's start coding with the first HTML file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;form id="quiz-form"&amp;gt;
      &amp;lt;div&amp;gt;
          &amp;lt;h2 &amp;gt;Triangle Quiz&amp;lt;/h2&amp;gt;
          &amp;lt;p&amp;gt;1. What is the third angle for the triangle where angle1 = 45° and angle2 = 
           45°?&amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
  &amp;lt;/form&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here I am using the form element to make a quiz because in javascript form element is used as a documenting section for submitting information. nowhere inside the form element, ideal practice is making separate div element for every new question. you will see ahead why I am saying this.&lt;/p&gt;

&lt;p&gt;now as this is MCQ quiz we need 4 options. to give options we are using input element but in input, we are using type as "radio".&lt;/p&gt;

&lt;p&gt;&lt;code&gt;why type="radio"&lt;/code&gt;&lt;br&gt;
because radio represents the collection of radio buttons describing related options.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Note 1:&lt;/code&gt; radio buttons of all options should share the same name.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Note 2:&lt;/code&gt; The value attribute defines the unique value associated with each radio button. The value is not shown to the user but is the value that is sent to the server on "submit" to identify which radio button was selected.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Note 3:&lt;/code&gt; Always add the tag for best accessibility practices!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form id="quiz-form" &amp;gt;
        &amp;lt;div&amp;gt;
            &amp;lt;h2 &amp;gt;Triangle Quiz&amp;lt;/h2&amp;gt;
            &amp;lt;p&amp;gt;1. What is the third angle for the triangle where angle1 = 45° and angle2 = 45°?&amp;lt;/p&amp;gt;
            &amp;lt;label&amp;gt;&amp;lt;input type="radio" name="question1" value="45°"/&amp;gt;45°&amp;lt;/label&amp;gt;
            &amp;lt;label&amp;gt;&amp;lt;input type="radio" name="question1" value="60°"/&amp;gt;60°&amp;lt;/label&amp;gt;
            &amp;lt;label&amp;gt;&amp;lt;input type="radio" name="question1" value="90°"/&amp;gt;90°&amp;lt;/label&amp;gt;
        &amp;lt;/div&amp;gt;

    &amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;now we have the question format ready we can make quiz of any number of questions. &lt;br&gt;
&lt;code&gt;Tip:&lt;/code&gt; remember to change the name tag inside the input tag for every question so that it toggles for only that question.&lt;/p&gt;

&lt;p&gt;now let's create a button to submit our test.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button id="submit-btn" &amp;gt;Submit Answers&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember write button element outside the form because if we click on button page gets refreshed. so to make it simple let's write a button element outside the form element.&lt;/p&gt;

&lt;p&gt;and last we are going to make another div for our final result.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Emoji translator using react js</title>
      <dc:creator>abhijeetekad</dc:creator>
      <pubDate>Thu, 19 Aug 2021 08:53:19 +0000</pubDate>
      <link>https://dev.to/abhijeetekad/emoji-translator-using-react-js-4ino</link>
      <guid>https://dev.to/abhijeetekad/emoji-translator-using-react-js-4ino</guid>
      <description>&lt;p&gt;&lt;strong&gt;Why code sandbox to develop this app.&lt;/strong&gt;&lt;br&gt;
This is beginner friendly web application to make so code sandbox solves the problem of creating environment which is required for react framework.&lt;/p&gt;

&lt;p&gt;We can call code sandbox; vscode on the cloud.&lt;/p&gt;

&lt;p&gt;code sandbox is very easy to use mainly for beginners like me. we can share the direct link of code to someone or if we want to do collaboration work in small teams then it is very easy to use.&lt;/p&gt;

&lt;p&gt;also it is online so we can directly link this to our GitHub repository, fork repository any time to make changes without changing actual code that's why I am using code sandbox here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;let's start&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;before writing anything first understand that we are writing code in .js file instead of .html file because we are using javascript this is same as html but in our workplace that is in app.js jsx has an important role it converts html into js.&lt;/p&gt;

&lt;p&gt;We can use jsx as a template. in this app I have used embedding in javascript everytime whenever I wanted to prepare result to display on screen using setter function. I will explain that later but first we will see the example of embedding.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import React from "react";&lt;br&gt;
  const userName = "Abijeet&lt;br&gt;
  export default function App() {&lt;br&gt;
  return (&lt;br&gt;
  &amp;lt;div className="App"&amp;gt;&lt;br&gt;
    &amp;lt;h1&amp;gt;Welcome {userName}&amp;lt;/h1&amp;gt;&lt;br&gt;
  &amp;lt;/div&amp;gt;&lt;br&gt;
  );&lt;br&gt;
}&lt;br&gt;
output: Welcome Abhijeet&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;similarly, we can use CSS properties in react using double parentheses. so this was the basic syntax which was different from normal HTML and css otherwise everything is almost the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making button which is clickable
&lt;/h2&gt;

&lt;p&gt;Syntex for the button is the same as in HTML but to make button clickable we are going to use onclick event here first we will see the syntax.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;button onClick={clickEventHandler}&amp;gt;Click Here &amp;lt;/button&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;this is syntex for button in react. here we are using onclick event rather than using .addEventListner() which we use in-plane javascript. here clickEventHandler is a function so we need to make a function with that name to proceed further otherwise we will get an error.&lt;/p&gt;

&lt;p&gt;but till now whatever we are getting as an output we are getting it in the console. now we want to show output on the screen. so now we are using the setter function and useState hook from react.&lt;/p&gt;

&lt;h3&gt;
  
  
  Update result on view/screen.
&lt;/h3&gt;

&lt;p&gt;*setter function and useState.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const [variable, setvariable]=useState(" ")&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;setter function is used to rerender code again. If we use a normal/single function without a set we cant render code again after one cycle. so we call setter function is the function that returns a function.&lt;/p&gt;

&lt;p&gt;In the above syntax, the variable function gets the value setvariable function before that it has the default value which is given in usestate("").&lt;/p&gt;

&lt;p&gt;use variable to show output on UI ex. {varible}&lt;/p&gt;

&lt;h2&gt;
  
  
  Handling the data from the input element
&lt;/h2&gt;

&lt;p&gt;This is our final app. in this we have to give emoji as input and it will give us the meaning of emoji.&lt;/p&gt;

&lt;p&gt;so we have to write code to process input data. to use input element put onChange event.&lt;br&gt;
make new function inputEventHandler pass parameter event from that now we are going to use target.value to take input and store in variable.&lt;/p&gt;

&lt;p&gt;and the last update the value using useState.&lt;/p&gt;
&lt;h2&gt;
  
  
  showing meaning to the user
&lt;/h2&gt;

&lt;p&gt;now input and output are done now we have to write code for processing. to do processing we need data that has emoji and its meaning. to store that data we are using objects and that data will be in key, value pair because we are using setter usestate to render.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ```const flagEmoji = {
 "😁": "Beaming Face with Smiling Eyes",
 "🤣": "Rolling on the Floor Laughing Face",
 "😭": "Loudly Crying Face",
 "😲": "Astonished Face"
  };  ```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this is the data on which we are going to do the process.&lt;/p&gt;

&lt;h3&gt;
  
  
  converting object into an array
&lt;/h3&gt;

&lt;p&gt;to handle data we are going to use .map function for that we need to convert objects into arrays because the map function doesn't traverse through objects.&lt;br&gt;
By using this we can get keys on screen and also we can click on that to get the meaning of that particular emoji,&lt;/p&gt;

&lt;p&gt;at last, we need to use the setter function once again to render meaning. setMeaning(object[input])&lt;/p&gt;

&lt;p&gt;I have made this app in &lt;a href="https://neog.camp/" rel="noopener noreferrer"&gt;https://neog.camp/&lt;/a&gt; level zero program. so thanks to Tanay Pratap for teaching these concepts.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
