Hello! I am Codemzy and I love to code. JavaScript is my favourite flavour. I blog about coding, software and my projects.
One of the hardest parts of coding is when something just doesn’t work. And you don’t know why. In this blog post, I'll show you 6 ways to figure out why your code isn't working.
Written by Codemzy in JavaScript on July 27th, 2023
In this blog post, I shuffle an array of objects into a random order with two JavaScript methods, `Array.sort()` and a `shuffleArray` function. Check out the code and which performs best.
Written by Codemzy in JavaScript on July 20th, 2023
Getting "[object Object]" is not valid JSON error in your code is annoying, but there is often a simple fix. Maybe you don't need JSON.parse(), or maybe you're giving it the wrong data. Here's an easy fix (and how to troubleshoot if you're still stuck).
Written by Codemzy in JavaScript on June 20th, 2023
You can use Array.join() on an array of objects, but `join()` will only work with strings, so you need to get the property value(s) first. Let's look at some examples.
Written by Codemzy in JavaScript on May 30th, 2023
In this blog post, I create a javascript function to separate the last word in a string, so I can keep it attached to an inline icon, to prevent the icon from wrapping to a new line on its own.
Written by Codemzy in JavaScript on May 25th, 2023