<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Francis Ajayi on Medium]]></title>
        <description><![CDATA[Stories by Francis Ajayi on Medium]]></description>
        <link>https://medium.com/@commitfrncs?source=rss-347721d7f77b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BjDQFh8cm0d71dN2oC74bg.jpeg</url>
            <title>Stories by Francis Ajayi on Medium</title>
            <link>https://medium.com/@commitfrncs?source=rss-347721d7f77b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 17 May 2026 03:08:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@commitfrncs/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[3 JavaScript Console Tricks I Wish I Knew on Day One]]></title>
            <link>https://commitfrncs.medium.com/3-javascript-console-tricks-i-wish-i-knew-on-day-one-98440cb32fa3?source=rss-347721d7f77b------2</link>
            <guid isPermaLink="false">https://medium.com/p/98440cb32fa3</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[begginer-tips]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Francis Ajayi]]></dc:creator>
            <pubDate>Sat, 03 Jan 2026 01:34:04 GMT</pubDate>
            <atom:updated>2026-01-03T01:34:04.471Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m going to be honest with you: I’ve been console.log()-ing my way through JavaScript like it&#39;s my full-time job. Every variable, every function return, every &quot;wait, what&#39;s happening here?&quot; moment gets a trusty console.log() slapped on it. And you know what? It works. Sort of.</p><p>But last week, while debugging a function that wasn’t behaving, I had about fifteen console.logs stacked on top of each other, and I realized I had no idea which log was which anymore. My console looked like a chaotic grocery list, and I was drowning in my own debugging attempts.</p><p>That’s when a classmate showed me a few console methods I didn’t even know existed. Mind. Blown. These aren’t advanced tricks or complex debugging tools — just three simple console methods that make life so much easier when you’re trying to figure out what your code is actually doing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ciVgym5XeJR8-kOtuxFodw.png" /><figcaption>What’s the one console trick you actually use? For me, console.table() was a game-changer. Here are 3 that made debugging less of a nightmare when I was starting out.</figcaption></figure><h3>1. console.table() — Because Arrays Deserve Better Than This: [object Object]</h3><p><strong>The Problem:</strong> You know that moment when you console.log() an array of objects and get something like this mess?</p><pre>const users = [<br>  { name: &quot;Sarah&quot;, age: 24, role: &quot;student&quot; },<br>  { name: &quot;Mike&quot;, age: 22, role: &quot;student&quot; },<br>  { name: &quot;Jenny&quot;, age: 26, role: &quot;TA&quot; }<br>];</pre><pre>console.log(users);<br>// You get a collapsed array you have to click through...</pre><p>You end up clicking those little arrows to expand each object, scrolling up and down, trying to compare values. It’s tedious.</p><p><strong>The Solution:</strong> Enter console.table(). Just swap out that log:</p><pre>console.table(users);</pre><p>And suddenly, you get an actual <em>table</em> in your console. Like, a real table with columns for name, age, and role. Each row is numbered with the array index. You can see everything at once, compare values instantly, and actually understand your data structure without the mental gymnastics.</p><p>This changed how I debug API responses. When I fetch a list of users or products, I can immediately see if any data is missing or formatted wrong. No more clicking through nested objects like I’m playing a game of developer whack-a-mole.</p><h3>2. console.group() — Organizing the Chaos</h3><p><strong>The Problem:</strong> Remember those fifteen console.logs I mentioned? Here’s what my console looked like:</p><pre>checking user...<br>user object:<br>starting validation<br>email format<br>email valid: true<br>checking password<br>password length<br>password valid: true<br>calling API<br>API response</pre><p>Which logs belong together? Who knows! It’s just a wall of text, and good luck figuring out which “checking” goes with which validation when you’ve got multiple function calls happening.</p><p><strong>The Solution:</strong> console.group() and console.groupEnd() create collapsible sections:</p><pre>function validateUser(user) {<br>  console.group(&#39;User Validation&#39;);<br>  <br>  console.log(&#39;User:&#39;, user.name);<br>  console.log(&#39;Email valid:&#39;, validateEmail(user.email));<br>  console.log(&#39;Password valid:&#39;, validatePassword(user.password));<br>  <br>  console.groupEnd();<br>}</pre><p>Now your console shows a nice collapsible “User Validation” section. All related logs are nested inside it. You can collapse sections you don’t care about and focus on the ones you do. It’s like giving your debugging output a proper folder structure.</p><p>I started using this for any function that does multiple steps, and it’s made my debugging sessions way less frustrating. When something breaks, I can immediately see which <em>section</em> of my code is the problem.</p><h3>3. console.time() / console.timeEnd() — The Simple Speedometer</h3><p><strong>The Problem:</strong> I wrote a function that filters and sorts an array. It works, but it feels… slow? Is it actually slow? How slow is slow? I had no idea.</p><p><strong>The Solution:</strong> Wrap your code in timing markers:</p><pre>console.time(&#39;filterUsers&#39;);</pre><pre>const activeUsers = users<br>  .filter(user =&gt; user.active)<br>  .sort((a, b) =&gt; a.name.localeCompare(b.name));</pre><pre>console.timeEnd(&#39;filterUsers&#39;);<br>// Output: filterUsers: 0.847ms</pre><p>The console tells you exactly how long that operation took. The labels need to match (whatever you pass to time() needs to match timeEnd()), and boom—instant performance measurement.</p><p>This is perfect for beginner-level optimization questions. Is my loop approach faster than this filter chain? Should I be worried about this nested loop? Just time both versions and compare. No fancy profiling tools needed, just a quick reality check on whether that function you’re worried about is actually the bottleneck (spoiler: it usually isn’t).</p><h3>Try These Today</h3><p>Here’s the thing about these methods — they don’t make you a better programmer overnight, but they do make debugging way less painful. And when debugging is less painful, you can focus more on actually learning JavaScript instead of getting frustrated with your own logs.</p><p>Next time you reach for console.log(), ask yourself: would console.table() make this clearer? Should I group these logs? Do I want to know how fast this runs? Start building these into your debugging habits now, and future-you will thank present-you.</p><p><strong>Your turn:</strong> What console methods have you discovered that made you wonder how you ever lived without them? Drop your favorites in the responses — I’m always looking for more tricks to add to my toolkit.</p><p><em>Currently learning JavaScript one console method at a time. If you found this helpful, give it a clap and follow for more “things I just learned” posts.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98440cb32fa3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>