DKDennis kestoneindenniskestone.hashnode.dev·Oct 2, 2023 · 2 min readAverage of an arrayThis was code Wars kata problem. Here is the question: DESCRIPTION: Write a function that calculates the average of the numbers in a given list. Note: Empty arrays should return 0. Solution First, we have to determine the sum of the total elements in...00
DKDennis kestoneindenniskestone.hashnode.dev·Aug 17, 2023 · 1 min readSquare Every DigitThis is a simple code wars kata I did today. DESCRIPTION: Welcome. In this kata, you are asked to square every digit of a number and concatenate them. For example, if we run 9119 through the function, 811181 will come out, because 92 is 81 and 12 is ...00
DKDennis kestoneindenniskestone.hashnode.dev·Aug 3, 2023 · 2 min readThe vowel caseSolving code wars kata problem: replacing vowels with numbers. In this problem, we are required to replace vowels in a given string with some numbers and reverse it if required. Here is the problem: Step 1: Create a function called encode() to replac...00
DKDennis kestoneindenniskestone.hashnode.dev·Jul 28, 2023 · 1 min readExtract the domain name from a URLThis is the simplest solution to the Code Wars kata Problem I solved today. Here is the instruction: Write a function that when given a URL as a string, parses out just the domain name and returns it as a string. For example: * url = "http://github.c...00
DKDennis kestoneindenniskestone.hashnode.dev·Dec 8, 2021 · 4 min readPure functions in functional programming.This article is a continuation of my previous article that i wrote on functional programming. If you haven't gone though it, here is the link. So, what are pure functions and how do they relate to functional programming? Great question that i hope to...00