# code-block-pro/1.9.0/build/shiki/samples/coffee.sample

Code Block Pro – Beautiful Syntax Highlighting, version 1.9.0. 30 lines.

- Page: https://pluginprobe.com/plugins/code-block-pro/1.9.0/code/build/shiki/samples/coffee.sample
- Raw: https://pluginprobe.com/plugins/code-block-pro/1.9.0/raw/build/shiki/samples/coffee.sample
- Modified: 2022-08-22T22:25:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-block-pro/1.9.0/code/build/shiki/samples/coffee.sample#L10-L20`.

```
# Assignment:
number   = 42
opposite = true

# Conditions:
number = -42 if opposite

# Functions:
square = (x) -> x * x

# Arrays:
list = [1, 2, 3, 4, 5]

# Objects:
math =
  root:   Math.sqrt
  square: square
  cube:   (x) -> x * square x

# Splats:
race = (winner, runners...) ->
  print winner, runners

# Existence:
alert "I knew it!" if elvis?

# Array comprehensions:
cubes = (math.cube num for num in list)

# From https://coffeescript.org/#overview
```
