---
id: 697a49e9860d24853adef67f
title: "Challenge 194: 2026 Winter Games Day 15: Freestyle Skiing"
challengeType: 28
dashedName: challenge-194
---

# --description--

Given a trick name consisting of two words, determine if it is a valid freestyle skiing trick name.

A trick is valid if the first word is in the list of valid first words, and the second word is in the list of valid second words.

- The two words will be separated by a single space.

Valid first words:

|`"Misty"`|
|-|
|`"Ghost"`|
|`"Thunder"`|
|`"Solar"`|
|`"Sky"`|
|`"Phantom"`|
|`"Frozen"`|
|`"Polar"`|

Valid second words:

|`"Twister"`|
|-|
|`"Icequake"`|
|`"Avalanche"`|
|`"Vortex"`|
|`"Snowstorm"`|
|`"Frostbite"`|
|`"Blizzard"`|
|`"Shadow"`|

# --hints--

`isValidTrick("Polar Vortex")` should return `true`.

```js
assert.isTrue(isValidTrick("Polar Vortex"));
```

`isValidTrick("Solar Icequake")` should return `true`.

```js
assert.isTrue(isValidTrick("Solar Icequake"));
```

`isValidTrick("Thunder Blizzard")` should return `true`.

```js
assert.isTrue(isValidTrick("Thunder Blizzard"));
```

`isValidTrick("Phantom Frostbite")` should return `true`.

```js
assert.isTrue(isValidTrick("Phantom Frostbite"));
```

`isValidTrick("Ghost Avalanche")` should return `true`.

```js
assert.isTrue(isValidTrick("Ghost Avalanche"));
```

`isValidTrick("Snowstorm Shadow")` should return `false`.

```js
assert.isFalse(isValidTrick("Snowstorm Shadow"));
```

`isValidTrick("Solar Sky")` should return `false`.

```js
assert.isFalse(isValidTrick("Solar Sky"));
```

# --seed--

## --seed-contents--

```js
function isValidTrick(trickName) {

  return trickName;
}
```

# --solutions--

```js
function isValidTrick(trickName) {
  const validFirst = ["Misty", "Ghost", "Thunder", "Solar", "Sky", "Phantom", "Frozen", "Polar"];
  const validSecond = ["Twister", "Icequake", "Avalanche", "Vortex", "Snowstorm", "Frostbite", "Blizzard", "Shadow"];

  const words = trickName.split(" ");
  const [first, second] = words;
  return validFirst.includes(first) && validSecond.includes(second);
}
```
