<?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: Amirul Abu</title>
    <description>The latest articles on DEV Community by Amirul Abu (@amirulabu).</description>
    <link>https://dev.to/amirulabu</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%2F101875%2F50474927-9af9-417a-8aba-597d35ade16f.jpg</url>
      <title>DEV Community: Amirul Abu</title>
      <link>https://dev.to/amirulabu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amirulabu"/>
    <language>en</language>
    <item>
      <title>Learning Update: May 2020</title>
      <dc:creator>Amirul Abu</dc:creator>
      <pubDate>Wed, 27 May 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/amirulabu/learning-update-may-2020-43g6</link>
      <guid>https://dev.to/amirulabu/learning-update-may-2020-43g6</guid>
      <description>&lt;p&gt;Starting this month, I want to record and track all my learnings in this blog. I have been learning so many things, but I did not track or wrote it down systematically in one place. This is my attempt to capture all my learnings or at least what are the subjects that I read or practice.&lt;/p&gt;

&lt;p&gt;Since this is the first in this series, I want to record things that I have learned since Jan 2020.&lt;/p&gt;

&lt;h2&gt;
  
  
  Serverless framework #
&lt;/h2&gt;

&lt;p&gt;I did an endpoint using &lt;a href="http://serverless.com/"&gt;serverless framework&lt;/a&gt; with NodeJS runtime. It does have quite tight integration with AWS Lambda so deploying to AWS is as easy as running a deploy command.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nuxt.js &lt;a href="//#nuxt.js"&gt;#&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Nuxt is a Javascript frontend framework using Vue. It does have interesting modes to suit your use cases. Assuming your content is stored in a database, here are some of the modes and use cases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Server Rendered (Universal SSR)&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Loads content in the HTML then served to the client.&lt;/li&gt;
&lt;li&gt;Usually picked to improve SEO.&lt;/li&gt;
&lt;li&gt;Suitable for user-generated content, new content will be available instantly.&lt;/li&gt;
&lt;li&gt;Deploy as a separate service alongside your backend API.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Single Page Applications (SPA)&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Loads an empty HTML, then populates the content via Javascript, some web crawlers might have a problem recognizing the content.&lt;/li&gt;
&lt;li&gt;Suitable for user-generated content, new content will be available instantly.&lt;/li&gt;
&lt;li&gt;Deploy as static file, less complexity.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Static Generated (Pre Rendering)&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Using &lt;code&gt;nuxt generate&lt;/code&gt; command to generate all the content in the HTML when deployed.&lt;/li&gt;
&lt;li&gt;Suitable for content that does not change frequently and/or user-generated. Any changes in content need to regenerate the web app.&lt;/li&gt;
&lt;li&gt;Deploy as static file, less complexity.&lt;/li&gt;
&lt;li&gt;Cannot use dynamic routes eg. &lt;code&gt;example.com/product/:id&lt;/code&gt; (&lt;a href="https://medium.com/js-dojo/how-i-generated-dynamic-routes-for-different-nuxt-js-pages-ce2ee6972743"&gt;well you can&lt;/a&gt;, but need to keep in mind the changes is only reflected when you regenerate the web app).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  GraphQL subscriptions #
&lt;/h2&gt;

&lt;p&gt;Made a simple project to test out GraphQL subscriptions. It is kinda a twitter clone that live updates the feed.&lt;br&gt;&lt;br&gt;
Code is done using VueJS SPA as frontend with Vue Apollo for integrating GraphQL in Vue, and GraphQL Yoga as backend.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/amirulabu/twotter"&gt;https://github.com/amirulabu/twotter&lt;/a&gt;, &lt;a href="https://twotter.mirul.xyz/"&gt;https://twotter.mirul.xyz/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Strapi CMS #
&lt;/h2&gt;

&lt;p&gt;I did a side gig for my friend and decided I do not want to build the backend from scratch using KoaJS, so I tried using Strapi CMS instead. It very fun to work with and I would say Strapi is quite flexible to add functionality. Among additional features I have added for the project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ReCaptcha for the contact form&lt;/li&gt;
&lt;li&gt;Facebook login to save long-lived page access token for background tasks&lt;/li&gt;
&lt;li&gt;send telegram message when new content is added.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Clean Code #
&lt;/h2&gt;

&lt;p&gt;I started reading and watching the video series Clean Code, right now I am at chapter 4, Function Structures. I was very glad I started reading Clean Code since there are lots of gems that I can apply for my day to day task as a software engineer. I probably will write a separate blog post on the summary and my opinions on Clean Code.&lt;/p&gt;

&lt;p&gt;Now I realize why certain frameworks and libraries write code in a certain way. Why they have certain naming, and how to pick a good name for a class, variable or function.&lt;/p&gt;

&lt;h2&gt;
  
  
  Eleventy #
&lt;/h2&gt;

&lt;p&gt;This blog is made using Eleventy. It is always a good idea to start with a starter project rather than starting from scratch with any static site generator.&lt;/p&gt;




&lt;p&gt;originally posted at &lt;a href="https://mirul.xyz/posts/learning-update-may-2020/"&gt;mirul.xyz&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>2019 Résumé  Review</title>
      <dc:creator>Amirul Abu</dc:creator>
      <pubDate>Sat, 09 May 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/amirulabu/2019-resume-review-1b3a</link>
      <guid>https://dev.to/amirulabu/2019-resume-review-1b3a</guid>
      <description>&lt;p&gt;Let us review my 2019 résumé before I quit my job at PetChem. I did this résumé following this very concise guide from &lt;a href="https://www.freecodecamp.org/news/writing-a-killer-software-engineering-resume-b11c91ef699d/"&gt;freecodecamp blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AOSDuIdj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mirul.xyz/img/resume2019.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AOSDuIdj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mirul.xyz/img/resume2019.jpg" alt="résumé 2019"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As I am changing my career from a non-tech to a software engineer, I want to emphasize what can I do by listing my projects first. My advice for Computer Science graduates, better put your qualifications on top, do not follow me.&lt;/p&gt;

&lt;p&gt;HabitBot was an idea from my friend, who needs to be disciplined by having a telegram bot remind his everyday schedule. The habits can be added via the web application or by the bot. The bot was taken down since I am not using that bot anymore.&lt;/p&gt;

&lt;p&gt;The work process dashboard was one attempt to simplify my daily task at my previous job. I need to track a lot of documents in various stages, therefore I built a web application with a dashboard to easily report to management.&lt;/p&gt;

&lt;p&gt;So far both of these project I built using Django, because that time, I just finished the Python Crash Course book and was familiar with Django. Belajar Python Bot, now in its 3rd iteration, previously was using Serverless framework, then I rewrote it using Flask with Zappa and deploy to AWS Lambda. BelajarPythonBot is the longest Python project, that is still up.&lt;/p&gt;

&lt;p&gt;I also got some little gigs for doing static websites for short rental houses (homestay). This demonstrates that I already have the basics of HTML, CSS, and JS in place.&lt;/p&gt;

&lt;p&gt;Then I continue my résumé with my job experience. I did not put any description on my job at PetChem since it would be not related to any jobs that I was applying to. For the part-time online seller, I put that in, just to show I have that entrepreneurial experience and as a side project, I did while I was in Uni. I also got a side gig to build a website for a printing shop. Surprisingly, the website is still up an alive till today. I occasionally log in to the admin area and update some plugins here and there. The owner of the printing shop still contacts me from time to time. However, I do think the years I work as a web developer is somewhat misleading since I did the website while having an end of semester holiday during Uni. That's why I put the job title as a part-time web developer.&lt;/p&gt;

&lt;p&gt;To summarize my skills from my projects above, I list down all the keywords that I deem important to emphasize for the person looking at this resume. My current thoughts today is, I still have a lot to learn about Linux Server Administration, and should not list that there.&lt;/p&gt;

&lt;p&gt;Lastly, the education section, where I back up my skills and instill a bit more confidence to the recruiter that I am capable to become a software developer. I completed the CS50 course(and bought the certificate) and did most of Freecodecamp's front-end javascript challenges.&lt;/p&gt;

&lt;p&gt;About the web development boot camp, I was lucky since they were just starting up and I am their 2nd or 3rd batch. I also got sponsorship by MAGIC to learn web development, so I joined the class right after I finished my degree in Uni. Although nowadays I do not use Ruby on Rails, through this boot camp I have the confidence to start programming, learn more programming things by myself, and build pet projects.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Should you take CS50?</title>
      <dc:creator>Amirul Abu</dc:creator>
      <pubDate>Thu, 28 Mar 2019 15:59:58 +0000</pubDate>
      <link>https://dev.to/amirulabu/should-you-take-cs50-4k6d</link>
      <guid>https://dev.to/amirulabu/should-you-take-cs50-4k6d</guid>
      <description>&lt;p&gt;There are lots of praises around the web on how &lt;a href="https://www.edx.org/course/cs50s-introduction-computer-science-harvardx-cs50x" rel="noopener noreferrer"&gt;Harvard University's Introduction to Computer Science CS50&lt;/a&gt; is great, especially for people without prior computer science education. In this post I explain what are the stuff that intrigue me as a self-learner.&lt;/p&gt;

&lt;p&gt;But before we go through the new things that I learned, I would like to help you answer, should you take the CS50 course? If there are some things below that you are not really familiar, or have heard but never tried it out and do it yourself, sure, CS50 is a great resource for that. On the other hand, if you are familiar and can explain what are these items below, I would recommend you to skip this course. 😁&lt;/p&gt;

&lt;p&gt;Here are some of the items that is new to me that I learned and applied in CS50: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Scratch&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I have heard about scratch in the past, but not curious enough to try since it is always branded as a beginners tool to understand programming.
&lt;/li&gt;
&lt;li&gt;When i was much younger, I played a lot of simple flash games on &lt;a href="https://www.miniclip.com" rel="noopener noreferrer"&gt;Miniclip&lt;/a&gt;, and one of it is 2D racing game like this.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fh1s5hfhpofae5jgm4ouk.png" alt="2d racing game"&gt;
&lt;/li&gt;
&lt;li&gt;So, I did this as my project for week 0(&lt;a href="https://scratch.mit.edu/projects/237111313/" rel="noopener noreferrer"&gt;2D Racing Game&lt;/a&gt;), it is not perfect, but I had fun. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sort algorithms and Big O &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prior doing CS50, I can program a simple Python script to sort things in an list, but I found out it is actually called insertion sort and there are already a few other sorting algorithms.&lt;/li&gt;
&lt;li&gt;There is also a metric that measure the time taken to solve as the items to be sorted becomes bigger which is Big O.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reading files bit by bit&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now i understand what actually makes up the type of file. You cannot simply change a file type just by changing its file extension.&lt;/li&gt;
&lt;li&gt;There are a few bits at the header of the files that contain information about the file and that what makes, for example, a .jpg file different than .png file.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pointers, Linked List, Hash Tables&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Appreciation on memory usage when running a program and what is the difference of heap and stack in memory.&lt;/li&gt;
&lt;li&gt;Doing in programming in Python before, I do not really care about memory as I do not need to malloc and free memory. &lt;/li&gt;
&lt;li&gt;Also I can brag that I know how to do linked list in C. Yay.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From week 4 forward, most of it I have already read and do in the past so it is really smooth sailing from there. If you want to just skim through the syllabus , do check out the CS50 lecture notes &lt;a href="https://cs50.harvard.edu/college/weeks/" rel="noopener noreferrer"&gt;here.&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>JavaScript Higher Order Example</title>
      <dc:creator>Amirul Abu</dc:creator>
      <pubDate>Sat, 23 Feb 2019 09:18:18 +0000</pubDate>
      <link>https://dev.to/amirulabu/javascript-higher-order-example-4hbg</link>
      <guid>https://dev.to/amirulabu/javascript-higher-order-example-4hbg</guid>
      <description>&lt;p&gt;This is an excerpt from &lt;a href="http://shop.oreilly.com/product/0636920049579.do"&gt;Learning React&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;createScream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toUpperCase&lt;/span&gt;&lt;span class="p"&gt;()&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="p"&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;scream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createScream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="nx"&gt;scream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;functions can be returned from other functions&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;scream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;createScream returns a function&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;scream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;scream invokes that returned function&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;It is a daunting task to really understand what is happening here. One of the immediate question is, how does the string in &lt;code&gt;scream()&lt;/code&gt; can be passed all the way to &lt;code&gt;logger&lt;/code&gt; then &lt;code&gt;toUpperCase()&lt;/code&gt; then &lt;code&gt;console.log()&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;It is much clearer to understand using ES6 fat arrows&lt;br&gt;
&lt;/p&gt;

&lt;div class="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;createScream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;logger&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;message&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;logger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toUpperCase&lt;/span&gt;&lt;span class="p"&gt;()&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;scream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createScream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="nx"&gt;scream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;functions can be returned from other functions&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;scream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;createScream returns a function&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;scream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;scream invokes that returned function&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;If you don't understand it by now, don't worry. I will to break it down for you.&lt;/p&gt;

&lt;p&gt;Here's another way of writing the code above, but skipping the higher order function, instead we hard-code the &lt;code&gt;console.log()&lt;/code&gt; functionality.&lt;br&gt;
&lt;/p&gt;

&lt;div class="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;scream2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&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;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toUpperCase&lt;/span&gt;&lt;span class="p"&gt;()&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;scream2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;the string is passed to message&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;The string &lt;code&gt;'the string is passed to message'&lt;/code&gt; will go the &lt;code&gt;scream2()&lt;/code&gt; parameter, then changed to uppercase and concatenated with exclaimation marks. This will happen first since they are in a bracket. Then the answer is &lt;code&gt;console.log()&lt;/code&gt; out. &lt;/p&gt;

&lt;p&gt;Another way of looking at it is by separating the functions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;scream3&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toUpperCase&lt;/span&gt;&lt;span class="p"&gt;()&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="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scream3&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;this is another test&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;



</description>
      <category>javascript</category>
      <category>higherorderfunction</category>
    </item>
  </channel>
</rss>
