## 30秒学会 Golang 片段 – IsInRange

Checks if the given number falls within the given range.

Use `math.Min()` and `math.Max()` to determine the start and end of the range.
Use arithmetic comparison to check if the given number is in the specified range.

## 30秒学会 JavaScript 片段 – average

Returns the average of two or more numbers.

Use `Array.prototype.reduce()` to add each value to an accumulator, initialized with a value of `0`, divide by the `length` of the array.

## 30秒学会 Dart 片段 – difference

Returns the difference between two lists.

Use `Iterable.toSet()` to get the unique values in `b`.
Use `Iterable.where()` in combination with `Iterable.contains()` to keep only the values in `a` not contained in `b`, `Iterable.toList()` to return the appropriate result.

## 30秒学会 Dart 片段 – digitize

Converts an integer to a list of digits.

Use string interpolation to convert the integer to a string, `String.split('')` to convert it into a list.
Use `Iterable.map()` and `int.parse()` to transform each value to an integer, `Iterable.toList()` to return a list.

## 30秒学会 PHP 片段 – median

Returns the median of an array of numbers.

Find the middle of the array, use `sort()` to sort the values.
Return the number at the midpoint if the array’s length is odd, otherwise the average of the two middle numbers.

## 30秒学会 JavaScript 片段 – xProd

Creates a new array out of the two supplied by creating each possible pair from the arrays.

Use `Array.prototype.reduce()`, `Array.prototype.map()` and `Array.prototype.concat()` to produce every possible pair from the elements of the two arrays and save them in an array.

## 30秒学会 Dart 片段 – union

Returns every element that exists in any of the two lists once.

Use the plus operator (`+`) to concatenate `a` and `b`, `Iterable.toSet()` to get the unique values, `Iterable.toList()` to return a list.

## 30秒学会 JavaScript 片段 – isOdd

Returns `true` if the given number is odd, `false` otherwise.

Checks whether a number is odd or even using the modulo (`%`) operator.
Returns `true` if the number is odd, `false` if the number is even.