Concatenate (smoosh) strings

Write an expression the evaluates to the concatenation of the strings 'foo' and 'bar'.

Indexing

What is the value of 'foo'[0]?

Length

What is the value of 'foo'.length?

Another length

What is the value of 'foo\nbar'.length?

And one more

What is the value of 'foo\\nbar'.length?

More indexing

What is the value of 'foo'['foo'.length - 1]?

UPPER CASE

What is the value of 'foo'.toUpperCase()?

lower case

What is the value of 'FOO'.toLowerCase()?

Concatenate (smoosh) strings

Write an expression the evaluates to the concatenation of the values of the string variables s1 and s2.

First character

Write an expression the evaluates to the first character of the value of the string variable s.

All but first

Write an expression the evaluates to a string containing all but the first character of the string in variable s.

First three

Write an expression the evaluates to a string containing the first three character of the string in variable s.

All but first and last

Write an expression the evaluates to a string containing all but the first and last character of the string in variable s.

Last three

Write an expression the evaluates to a string containing the last three character of the string in variable s.

Capitalize

Write an expression the evaluates to the the value of the string variable s with the first letter capitalized and the remaining letters in lower case.

Capitalize first three

Write an expression the evaluates to the the value of the string variable s with the first three letters capitalized and the remaining letters in lower case.