<?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: Duzmath Lajos</title>
    <description>The latest articles on DEV Community by Duzmath Lajos (@crabyke).</description>
    <link>https://dev.to/crabyke</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%2F534583%2F88b07e7e-28b4-44d5-aa80-2610c1cbbd3a.jpeg</url>
      <title>DEV Community: Duzmath Lajos</title>
      <link>https://dev.to/crabyke</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/crabyke"/>
    <language>en</language>
    <item>
      <title>Advice needed</title>
      <dc:creator>Duzmath Lajos</dc:creator>
      <pubDate>Thu, 29 Feb 2024 17:23:54 +0000</pubDate>
      <link>https://dev.to/crabyke/advice-needed-1okk</link>
      <guid>https://dev.to/crabyke/advice-needed-1okk</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hello Everyone!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I do not know, if this is the appropriate forum or site to ask my questions, but I am a bit lost.&lt;/p&gt;

&lt;p&gt;Right now, I am working as a Jira / Atlassian developer at a company, which means, that I am coding quite a lot in Adaptavist Scriptrunner addon's built-in coding features. (Scripted post-functions, scripted listeners, scripted fields etc.)&lt;/p&gt;

&lt;p&gt;The language the addon uses is Groovy, which is similar to Java, as some of you might know.&lt;br&gt;
I feel like I am doing well in my job, also I love doing coding during my job.&lt;br&gt;
That is the reason, that in the future I want to step up one level in coding, and &lt;strong&gt;not&lt;/strong&gt; be a Jira / Atlassian developer, but work as a normal developer.&lt;/p&gt;

&lt;p&gt;During the 2020-2021 pandemic, I was doing quite a lot of frontend coding, so I had a mediocre knowledge in HTML, CSS, SASS, Vanilla JS. I really liked that part, I even managed to recreate a boardgame I had, in plain HTML, CSS, VanillaJS. &lt;br&gt;
Until the realisation struck, that VanillaJS is not a viable career option anymore. &lt;br&gt;
I started learning React, then Angular...and they were overwhelming.&lt;br&gt;
I gave some tries to both of them, but I couldn't get the hang of none of them. They were overwhelming, and I am totally unable to understand those frameworks/libraries, and unfortunately, that's a fact. They are not for me.&lt;/p&gt;

&lt;p&gt;So, right now, here I am, loving frontend development, not understanding the currently popping frameworks and libraries, and wanting to be a full time "coder"/developer.&lt;/p&gt;

&lt;p&gt;And the question here is, what are my options in your opinion?&lt;br&gt;
Any advice is kindly appreciated.&lt;/p&gt;

&lt;p&gt;Thanks in advance for your feedback!&lt;/p&gt;

</description>
      <category>groovy</category>
      <category>jira</category>
      <category>programming</category>
      <category>career</category>
    </item>
    <item>
      <title>VanillaJS or Frameworks/Libraries (React)?</title>
      <dc:creator>Duzmath Lajos</dc:creator>
      <pubDate>Thu, 11 Feb 2021 08:05:28 +0000</pubDate>
      <link>https://dev.to/crabyke/vanillajs-or-frameworks-libraries-49c1</link>
      <guid>https://dev.to/crabyke/vanillajs-or-frameworks-libraries-49c1</guid>
      <description>&lt;h2&gt;
  
  
  Hello Everyone!
&lt;/h2&gt;

&lt;p&gt;For the last couple of weeks, I have a big dilemma. I really don't know, if I should stick with VanillaJS or focus on learning React.&lt;/p&gt;

&lt;p&gt;The reason behind this (these are all personal and from my points of view):&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;center&gt;VanillaJS&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easier to write and more logical&lt;/li&gt;
&lt;li&gt;Seems more usable for me, for some reason&lt;/li&gt;
&lt;li&gt;Lot of easy/intermediate projects for learning&lt;/li&gt;
&lt;li&gt;More enjoyable to write&lt;/li&gt;
&lt;li&gt;More experience of success&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feels like I will never really use this if I land a job&lt;/li&gt;
&lt;li&gt;Less maintainable&lt;/li&gt;
&lt;li&gt;Not really an up-to-date knowledge&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;center&gt;React&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Widely used in the industry&lt;/li&gt;
&lt;li&gt;Component based architecture is easier to maintain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Really hard to find &lt;strong&gt;REAL&lt;/strong&gt; beginner projects (feel like a Tic-Tac-Toe game or a To-Do list is not beginner friendly, because you cannot figure it out alone) Therefore the next point:&lt;/li&gt;
&lt;li&gt;Less experience of success&lt;/li&gt;
&lt;li&gt;Hard to understand the basics&lt;/li&gt;
&lt;li&gt;Seems like you &lt;strong&gt;MUST&lt;/strong&gt; use a CSS framework for it (but Tailwind and/or Bootstrap is really not my cup of tea) &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Also, the biggest fear of mine, that I will forget the VanillaJS, while I dig into React...yes, this might be the biggest fear in the story for me.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I am really looking forward onto some encouraging on both of the topics.&lt;/p&gt;

&lt;p&gt;Thank you in advance for your kind help and assistance.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>react</category>
      <category>javascript</category>
      <category>vue</category>
    </item>
    <item>
      <title>What are the most important skills to master (outside of coding) which will help you to land a job?</title>
      <dc:creator>Duzmath Lajos</dc:creator>
      <pubDate>Fri, 22 Jan 2021 14:30:17 +0000</pubDate>
      <link>https://dev.to/crabyke/what-are-the-most-important-skills-to-master-outside-of-coding-which-will-help-you-to-land-a-job-11fl</link>
      <guid>https://dev.to/crabyke/what-are-the-most-important-skills-to-master-outside-of-coding-which-will-help-you-to-land-a-job-11fl</guid>
      <description>&lt;h2&gt;
  
  
  Hello Everyone!
&lt;/h2&gt;

&lt;p&gt;So, I was just thinking that what are these skills, which are really important, outside of knowing how to code.&lt;br&gt;
I mean e.g.: Git, GitHub etc.&lt;/p&gt;

&lt;p&gt;Could you please suggest some stuff to learn before I start applying jobs?&lt;/p&gt;

&lt;p&gt;I know, that the lack of working in a team will be the hardest part, because I know how to code myself, but I will have no experience, how to code together with someone else or a team.&lt;/p&gt;

&lt;p&gt;Thank you in advance for your suggestions.&lt;/p&gt;

&lt;p&gt;Have a nice day!&lt;/p&gt;

</description>
      <category>skills</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Learning React</title>
      <dc:creator>Duzmath Lajos</dc:creator>
      <pubDate>Sun, 17 Jan 2021 15:57:46 +0000</pubDate>
      <link>https://dev.to/crabyke/learning-react-6el</link>
      <guid>https://dev.to/crabyke/learning-react-6el</guid>
      <description>&lt;p&gt;I have started learning React yesterday.&lt;br&gt;
I have put into that like 10 hours, since yesterday morning, but I feel like, I have &lt;strong&gt;ZERO&lt;/strong&gt; clue what is going on.&lt;/p&gt;

&lt;p&gt;I would like to kindly ask you fellow developers, to send me sources where I can understand the basics of this library.&lt;br&gt;
Brad Traversy's course was waaaaay to much and I had to leave the 2 hours video at the half of it, because there was too much going on.&lt;br&gt;
I am now doing &lt;a href="https://www.youtube.com/watch?v=pCA4qpQDZD8&amp;amp;t"&gt;Dev Ed's Todo list app&lt;/a&gt; but it's also too much and every one of these tutorials are too fast for a beginner like me.&lt;/p&gt;

&lt;p&gt;I feel like I have kind of good understanding of Vanilla JS, but React is a totally different cup of tea.&lt;/p&gt;

&lt;p&gt;Please help me :(&lt;/p&gt;

&lt;p&gt;Thank you in advance!&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Border Radius Generator Tool (VanillaJS)</title>
      <dc:creator>Duzmath Lajos</dc:creator>
      <pubDate>Sat, 02 Jan 2021 19:07:13 +0000</pubDate>
      <link>https://dev.to/crabyke/border-radius-generator-tool-vanillajs-4aan</link>
      <guid>https://dev.to/crabyke/border-radius-generator-tool-vanillajs-4aan</guid>
      <description>&lt;center&gt;
#**Hello Everyone!**
&lt;/center&gt;

&lt;p&gt;So, today I have decided to create a Border Radius Generator Tool, which is an existing stuff already, but I just wanted to create one, for the sake of practice.&lt;/p&gt;

&lt;p&gt;This is not an in-depth tutorial for that, just a quick recap, what I did and why.&lt;br&gt;
The main focus was to practice the &lt;em&gt;range input&lt;/em&gt; type, since I haven't used it yet.&lt;/p&gt;

&lt;center&gt;
#HTML
&lt;/center&gt;

&lt;p&gt;For the HTML, I have created 4 &lt;em&gt;range inputs&lt;/em&gt;, because the border-radius property has 4 values.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Four values - border-radius: 15px 50px 30px 5px; (first value applies to top-left corner, second value applies to top-right corner, third value applies to bottom-right corner, and fourth value applies to bottom-left corner)."&lt;/em&gt; &lt;/p&gt;

&lt;center&gt;
![Four values](https://dev-to-uploads.s3.amazonaws.com/i/mm15ecivzqcauduf6oed.jpg)

[Source of the previous quote](https://www.w3schools.com/cssref/css3_pr_border-radius.asp)
&lt;/center&gt;

&lt;p&gt;And also added one square, which will be modified by the sliders on the range inputs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;BORDER RADIUS GENERATOR&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"slider-container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"topLeftSlider"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Top Left&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"range"&lt;/span&gt; &lt;span class="na"&gt;min=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;max=&lt;/span&gt;&lt;span class="s"&gt;"100"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"slider"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"topLeftSlider"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- Put the middle section in one DIV --&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"left-box-right"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"slider-container bottom-left"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"bottomLeftSlider"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Bottom Left&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"range"&lt;/span&gt; &lt;span class="na"&gt;min=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;max=&lt;/span&gt;&lt;span class="s"&gt;"100"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"slider"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"bottomLeftSlider"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"box"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"slider-container top-right"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"topRightSlider"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Top Right&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"range"&lt;/span&gt; &lt;span class="na"&gt;min=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;max=&lt;/span&gt;&lt;span class="s"&gt;"100"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"slider"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"topRightSlider"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- Put the middle section in one DIV --&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"slider-container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"range"&lt;/span&gt; &lt;span class="na"&gt;min=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;max=&lt;/span&gt;&lt;span class="s"&gt;"100"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"slider"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"bottomRightSlider"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"bottomRightSlider"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Bottom Right&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;textarea&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"css-code"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"css-code"&lt;/span&gt; &lt;span class="na"&gt;cols=&lt;/span&gt;&lt;span class="s"&gt;"30"&lt;/span&gt; &lt;span class="na"&gt;rows=&lt;/span&gt;&lt;span class="s"&gt;"5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;border-radius: 0% 0% 0% 0%;&lt;span class="nt"&gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"copyCss"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Copy CSS&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"reset"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Reset&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might ask, &lt;strong&gt;WTF&lt;/strong&gt; is this?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"left-box-right"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Actually, I did this, because I am a lazy douchebag and wanted to get flexbox working here, with the default flex-direction, in order to get the inputs and the box next to each other.&lt;br&gt;
Sorry, not sorry. 😁&lt;/p&gt;

&lt;p&gt;Also, you might notice, that on the bottom of the code, there is one textarea and also 2 buttons.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;    &lt;span class="nt"&gt;&amp;lt;textarea&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"css-code"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"css-code"&lt;/span&gt; &lt;span class="na"&gt;cols=&lt;/span&gt;&lt;span class="s"&gt;"30"&lt;/span&gt; &lt;span class="na"&gt;rows=&lt;/span&gt;&lt;span class="s"&gt;"5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;border-radius: 0% 0% 0% 0%;&lt;span class="nt"&gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"copyCss"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Copy CSS&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"reset"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Reset&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The textarea will contain the values of the range inputs in a certain way, which will be:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;border-radius: 0% 0% 0% 0%;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The reason behind that is, that I want to be able to copy the values that I have done with the range inputs (let's call them sliders).&lt;/p&gt;

&lt;p&gt;The buttons below them are &lt;em&gt;Copy CSS&lt;/em&gt; and &lt;em&gt;Reset&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The Copy CSS will be doing, what is written on the button (what a surprise).&lt;br&gt;
The Reset button, will reset the values of the sliders, the textarea and the shape of the box.&lt;/p&gt;

&lt;center&gt;
#CSS
&lt;/center&gt;

&lt;p&gt;For the CSS part, I don't want to copy the whole code here, so I will just mention the important parts.&lt;/p&gt;

&lt;p&gt;Firstly, I rotated the two sliders on the left and the right side of the box, with the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.bottom-left&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-90deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.top-right&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This resulted in the following:&lt;/p&gt;

&lt;center&gt;
![Sliders](https://dev-to-uploads.s3.amazonaws.com/i/4vx3tja4vbgxku1qk65v.jpg)
&lt;/center&gt;

&lt;p&gt;Which might also be interesting for you, is the sliders' design:&lt;br&gt;
&lt;a href="https://www.w3schools.com/howto/howto_js_rangeslider.asp" rel="noopener noreferrer"&gt;It can be found here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's all about the CSS part.&lt;/p&gt;

&lt;p&gt;Now let's go to the interesting stuff. ➡&lt;/p&gt;

&lt;center&gt;
#JavaScript
&lt;/center&gt;

&lt;p&gt;I have defined all the needed stuff:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;topLeftSlider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#topLeftSlider&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;topRightSlider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#topRightSlider&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bottomRightSlider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#bottomRightSlider&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bottomLeftSlider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#bottomLeftSlider&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;box&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#box&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sliders&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;.slider&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cssCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#css-code&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;resetBtn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#reset&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;copyCss&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#copyCss&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might notice, that I defined each slider individually and also by their classname: &lt;em&gt;.slider&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The reason behind that is, that I wanted to use a forEach method, for the sake of practicing it, on the eventListener.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;sliders&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;slider&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// TO EACH CLICKED SLIDER, ADD "INPUT" EVENETLISTENER&lt;/span&gt;
    &lt;span class="nx"&gt;slider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;input&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// TARGET EACH OF THE RADIUS PROPERTY OF THE BOX AND PUSH THE VALUE OF THE SLIDER INTO THAT&lt;/span&gt;
        &lt;span class="nx"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;borderTopLeftRadius&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;topLeftSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;%&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;borderTopRightRadius&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;topRightSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;%&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;borderBottomRightRadius&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;bottomRightSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;%&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;borderBottomLeftRadius&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;bottomLeftSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;%&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="c1"&gt;// PUSH THE VALUES ALSO INTO THE COPIABLE TEXT OF THE TEXTAREA&lt;/span&gt;
        &lt;span class="nx"&gt;cssCode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`border-radius: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;topLeftSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;% &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;topRightSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;% &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;bottomRightSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;% &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;bottomLeftSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;%;
        `&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reason I used the "input" eventListener is because it updates the box's properties dinamically.&lt;/p&gt;

&lt;p&gt;After this, the tool was working:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffo913b0z2rigs8ktqx40.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffo913b0z2rigs8ktqx40.gif" alt="Working tool"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I finished jumping around of happinness, I moved onto the textarea and the buttons.&lt;/p&gt;

&lt;p&gt;The Copy CSS button is doing the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;copyCss&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;cssCode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;select&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execCommand&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;copy&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Targets the value in the textarea and copies the content of it to the clipboard.&lt;/p&gt;

&lt;p&gt;Now, there is only one thing left, the reset button:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;resetBtn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// RESET THE VALUE OF EACH SLIDER&lt;/span&gt;
    &lt;span class="nx"&gt;topLeftSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;topRightSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;bottomRightSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;bottomLeftSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// RESET THE BOX'S BORDER RADIUS&lt;/span&gt;
    &lt;span class="nx"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;borderRadius&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0 0 0 0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="c1"&gt;// AFTER RESETING THE SLIDER VALUES, PUSH THAT INTO THE TEXTAREA&lt;/span&gt;
    &lt;span class="nx"&gt;cssCode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`border-radius: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;topLeftSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;% &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;topRightSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;% &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;bottomRightSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;% &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;bottomLeftSlider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;%;`&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;center&gt;
#Remarks
&lt;/center&gt;

&lt;p&gt;The time spent in this project with the HTML, CSS and JS, was roughly 1 hour.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/crabyke/border-radius-tool" rel="noopener noreferrer"&gt;Here you can find the GitHub repo.&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/crabyke/full/KKgoNON" rel="noopener noreferrer"&gt;Here you can test the tool if you want to.&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;The tool had been created for PC, this is not responsive at all, yet.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have any tip, suggestion, remark, feel free to contact me anywhere.&lt;/p&gt;

&lt;p&gt;Have a nice day and rest of weekend everyone!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
      <category>vanilla</category>
    </item>
    <item>
      <title>Rock-Paper-Scissors Game</title>
      <dc:creator>Duzmath Lajos</dc:creator>
      <pubDate>Wed, 16 Dec 2020 21:38:26 +0000</pubDate>
      <link>https://dev.to/crabyke/rock-paper-scissors-game-548k</link>
      <guid>https://dev.to/crabyke/rock-paper-scissors-game-548k</guid>
      <description>&lt;h2&gt;
  
  
  Hello Everyone,
&lt;/h2&gt;

&lt;p&gt;...who might read this.&lt;/p&gt;

&lt;p&gt;First of all, I would like to mention that English is not my native language, so sorry for the grammar mistakes in advance.&lt;/p&gt;

&lt;p&gt;So, I have just created this game in the previous 2-3 hours from scratch and decided to write some notes about that and also ask for the community's opinion. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F57rye3le6ou5v3ad1jre.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F57rye3le6ou5v3ad1jre.PNG" alt="Game"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The game can be reached via this &lt;a href="https://rock-paper-scissors-swart-mu.vercel.app" rel="noopener noreferrer"&gt;link&lt;/a&gt;.
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Regarding the (JS) building process:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Firstly, I created an object, which contains the text format of each possibility (rock,paper,scissors) and then added the image sources also to this object.&lt;/p&gt;

&lt;p&gt;In my HTML I have made:&lt;br&gt;
&lt;strong&gt;playerChoiceImg&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;playerChoiceTxt&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;computerChoiceImg&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;computerChoiceTxt&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;to be able to modify the content in each of them.&lt;/p&gt;

&lt;p&gt;Then created a &lt;strong&gt;points&lt;/strong&gt; variable, which will store the points of each player (player and computer).&lt;/p&gt;

&lt;p&gt;After that, I needed a random generated number between 1 and 3 which will be indicating the computers choice.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxgwnam0pfgnvdp564tus.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxgwnam0pfgnvdp564tus.jpg" alt="Variables"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To be honest, I gave these objects an ID, but havent used them in the project. I just used the index of each at the selection. Like: choices[0].image...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adding the eventListener:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I have attached and eventlistener to the buttons, with the forEach() method, which I am learning to use properly nowadays.&lt;br&gt;
This eventlistener will do most of the work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6eno43pyrhbcyetxdyhf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6eno43pyrhbcyetxdyhf.jpg" alt="eventListener"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As your can see on this screenshot, I am using if-else statements, to define, which button does what and according to the textContent of the button.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Here I would like to ask, if you have any suggestion regarding this solution? (1st question. I will be indicating a number at each question, so it will be easier to answer, if you want to)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;** &lt;em&gt;Now, let's go back to the explanation.&lt;/em&gt; **&lt;/p&gt;

&lt;p&gt;So, the if-else statements:&lt;/p&gt;

&lt;p&gt;If the button has the text "Rock" in itself, then please show "Rock" in the &lt;strong&gt;playerChoiceTxt&lt;/strong&gt; and meanwhile change the image source of &lt;strong&gt;playerChoiceImg&lt;/strong&gt; to the one stored in the object.&lt;br&gt;
And the same for the other 2 options.&lt;/p&gt;

&lt;p&gt;After that, I crated the computer's choice function, which looks the following:&lt;br&gt;
(2nd question) &lt;em&gt;Is there a proper way to paste code here with the original formatting?&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl36mra4wmyon7lg5b1ad.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl36mra4wmyon7lg5b1ad.jpg" alt="Computer Choice"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some explanation regarding that (because it's a little bit spaghetti):&lt;br&gt;
&lt;strong&gt;1.&lt;/strong&gt; I have created a looping gif from the 3 images I use for the rock, paper and scissors options.&lt;br&gt;
This is kind of a workaround solution for not knowing how to do this in the code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F20b7ad5qgcsnlg7632lg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F20b7ad5qgcsnlg7632lg.gif" alt="Gif I have created"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(3rd question) &lt;em&gt;Any suggestions how should I loop through images and create a GIF like animation?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; Then added a setTimeout, which is responsible for the duration of the animation. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; Inside that, I told the function, to create a random number between 0-2, which are the element numbers in the &lt;strong&gt;choices&lt;/strong&gt; object.&lt;br&gt;
This will indicate the choice of the computer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt; Changed the text and the image content to the chosen object element's name and image source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.&lt;/strong&gt; Then ran the gameRules() function (which we will talk about later).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.&lt;/strong&gt; Updated the textContent of each player's point indicator.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhlmo1r6c2762nw1ohaqw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhlmo1r6c2762nw1ohaqw.jpg" alt="Point indicator"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7.&lt;/strong&gt; Checking the points at each function call, to check if somebody won. (whoWon() function)&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;function gameRules()&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  This is what I am not really proud of.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fa9x5ywhbijzuyb7e8udk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fa9x5ywhbijzuyb7e8udk.jpg" alt="Game Rules"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So basically, this function checks the player's choice and checks if the computer choice can beat it or not.&lt;br&gt;
I have set up these if-else statements according to the game's rules. If the computer won, add +1 to the computer's points, and at any other results, add +1 to the player's points.&lt;/p&gt;

&lt;p&gt;(4th question) &lt;em&gt;Is there an easier way? Any suggestion would come in handy.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;function whoWon()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;if-else statements again..and again..and again...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcl11fse8180z0qp0bbhp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcl11fse8180z0qp0bbhp.jpg" alt="Who won"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So basically, just checks the point array if anyone has already reached 10 points, and if so, then resets the points to their initial value.&lt;/p&gt;




&lt;p&gt;Huhh..that's all, I guess..&lt;br&gt;
This was my first post here, hopefully not the last, because it was a really enjoyable activity and language practice.&lt;/p&gt;

&lt;p&gt;If you have any question/suggestion/remark, feel free to contact me.&lt;/p&gt;

&lt;p&gt;Also, here is the GitHub repo, if you are interested in the source code:&lt;br&gt;
&lt;a href="https://github.com/crabyke/rock-paper-scissors" rel="noopener noreferrer"&gt;https://github.com/crabyke/rock-paper-scissors&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bye everyone!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>gamedev</category>
      <category>html</category>
      <category>css</category>
    </item>
  </channel>
</rss>
