Understanding For Loops in Golang
In Golang a for loop
is a way to loop through an iterable.
The most basic For Loop
i := 0
for i <= 3 {
i = i + 1
}
A classic For Loop
for i := 7; …
Read Article →
129 articles about go development, tools, and best practices
In Golang a for loop
is a way to loop through an iterable.
i := 0
for i <= 3 {
i = i + 1
}
for i := 7; …
Read Article →
You’ve probably just tried to initialise a new Go module, and received the following error:
go mod init: modules disabled by GO111MODULE=off; …
The task is to take a string of lower-cased words and convert the sentence to upper-case the first letter/character of each word …
Read Article →Given an array of integers your solution should find the smallest integer.
For example:
[34, 15, 88, 2]
your solution will return …You are given an array of arrays and your task will be to return the number of unique arrays that can be formed by picking exactly one …
Read Article →Implement a function that calculates the sum of the integers inside a string. For example, in the string …
Read Article →Complete the solution so that it reverses the string passed into it.
'world' => 'dlrow'
'word' => …
Read Article →
For a given list [x1, x2, x3, ..., xn]
compute the last (decimal) digit of x1 ^ (x2 ^ (x3 ^ (... ^ xn)))
.
Example:
last_digit({3, 4, 2}, …
Read Article →
An array is circularly sorted if the elements are sorted in ascending order but displaced, or rotated, by any number of steps.
Complete …
Read Article →Write a function toWeirdCase
(weirdcase
in Ruby) that accepts a string, and returns the same string with all even indexed characters in …
Create a function that takes a Roman numeral as its argument and returns its value as a numeric decimal integer. You don’t need to …
Read Article →Clock shows h
hours, m
minutes and s
seconds after midnight.
Your task is to write a function that returns the time since midnight in …
Read Article →