JS
…

Module 4 of 4

mixed review

Combine variables, functions, arrays, and logic like real interview drills.

JavaScript Practice · 0/8 completed · scroll down for every challenge

Challenge 1 of 8

Fizz value

Instructions

Write `fizz(n)` — return `"fizz"` when n divisible by 3, else return n as string.

Editor

IntelliSense on

// Write your code below

Challenge 2 of 8 · Array average

Challenge 2 of 8

Array average

Instructions

Write `average(nums)` returning the mean of a non-empty number array.

Editor

IntelliSense on

// Write your code below

Challenge 3 of 8 · Count vowels

Challenge 3 of 8

Count vowels

Instructions

Write `countVowels(text)` returning how many a,e,i,o,u (case-insensitive) appear.

Editor

IntelliSense on

// Write your code below

Challenge 4 of 8 · Reverse string

Challenge 4 of 8

Reverse string

Instructions

Write `reverse(text)` that returns the reversed string.

Editor

IntelliSense on

// Write your code below

Challenge 5 of 8 · Palindrome check

Challenge 5 of 8

Palindrome check

Instructions

Write `isPalindrome(text)` returning true for strings that read the same backwards.

Editor

IntelliSense on

// Write your code below

Challenge 6 of 8 · Unique values

Challenge 6 of 8

Unique values

Instructions

Write `unique(nums)` returning a new array with duplicates removed.

Editor

IntelliSense on

// Write your code below

Challenge 7 of 8 · Clamp number

Challenge 7 of 8

Clamp number

Instructions

Write `clamp(n, min, max)` so n stays within [min, max].

Editor

IntelliSense on

// Write your code below

Challenge 8 of 8 · Title case word

Challenge 8 of 8

Title case word

Instructions

Write `capitalize(word)` returning the word with first letter uppercase.

Editor

IntelliSense on

// Write your code below

Next module