Search⌘ K
AI Features

Strings in Javascript

Explore key string manipulation techniques in JavaScript by practicing exercises such as reducing consecutive duplicates, wrapping lines without breaking words, and reversing strings. This lesson helps you strengthen your understanding of string operations and apply them effectively.

We'll cover the following...

Assess your skills

Evaluate your string concepts by reducing the consecutive duplicate characters to the desired minimum.

Javascript (babel-node)
reduceString = function(str, amount) {
}

Test yourself by wrapping lines at a given number of columns without breaking words.

Javascript (babel-node)
wordWrap = function(str, cols) {
return "abcdef\nabcde\nabc\ndef"
}

Test yourself by reversing a string.

Javascript (babel-node)
reverseString = function(str) {
}