diff --git a/snippets/RGB-to-hexadecimal.md b/snippets/RGB-to-hexadecimal.md index 3e53fc25d..11520c8e9 100644 --- a/snippets/RGB-to-hexadecimal.md +++ b/snippets/RGB-to-hexadecimal.md @@ -1,4 +1,4 @@ -## RGB to hexadecimal +### RGB to hexadecimal Convert each value to a hexadecimal string, using `toString(16)`, then `padStart(2,'0')` to get a 2-digit hexadecimal value. Combine values using `join('')`. diff --git a/snippets/greatest-common-divisor-(GCD).md b/snippets/greatest-common-divisor-(GCD).md index 1a4b8a1e7..3a201fb28 100644 --- a/snippets/greatest-common-divisor-(GCD).md +++ b/snippets/greatest-common-divisor-(GCD).md @@ -1,4 +1,4 @@ -## Greatest common divisor (GCD) +### Greatest common divisor (GCD) Use recursion. Base case is when `y` equals `0`. In this case, return `x`.