Difference Between Regular Functions and Arrow FunctionsWhat are Regular Functions and Arrow Functions? Regular Function A regular function (function expression) is a traditional way to write functions. (Check out my other blog post to learn more about function declarations and functions expression!) co...1AApr 27, 2022 · 2 min readayatakamura.hashnode.dev
Difference Between Function Expression and Function DeclarationWhat is a Function Declaration? According to the MDN docs, "the function declaration (function statement) defines a function with the specified parameters". function addNums(a, b) { return a + b; } console.log(addNums(5, 6)); //11 What is...Apr 27, 2022 · 1 min readayatakamura.hashnode.dev
How To Reverse a String (JavaScript)I came across this task in a Palindrome Problem on LeetCode. In this article, I will explain how to reverse a string. How To Reverse a String const string = "abcdefg"; const reversed = string.split('').reverse().join(''); console.log(reversed) //gfe...Mar 2, 2022 · 2 min readayatakamura.hashnode.dev
JavaScript reverse() Method Explained!I recently learned a very simple yet powerful JavaScript method - reverse! How It Works The reverse() method reverses an array in place. The reverse() method is destructive and changes the original array. const original = ["a", "b", "c"]; const rever...Mar 1, 2022 · 1 min readayatakamura.hashnode.dev
JavaScript Error Handling 1I was extracting some functions from the Vanilla JavaScript project files for later testing with Jest. I ran into a few errors, so I'm writing this article as a note. Uncaught SyntaxError: Cannot use import statement outside a module When I was extra...Nov 10, 2021 · 1 min readayatakamura.hashnode.dev