WITI cohort 2 Test
-
Write a JavaScript program to change text color to blue on mouse over. (1mk)
-
Write a JavaScript function to check whether an
input
is a string or not. (1mk) -
Create a form with an input and display an error if the input value is not a number. Display the error message below the input box in red color. (2mk)
-
Write a JavaScript function to split a string and convert it into an array of words. (1mk)
-
Write a JavaScript function that takes a string which has lower and upper case letters as a parameter and converts upper case letters to lower case, and lower case letters to upper case. (2mk)
-
Create an object to store the following information about your favorite movie: title (a string), duration (a number), and star (an object of name, country and age strings). (4mk) Create a function to log the movie information like so: "Puff the Magic Dragon lasts for 30 minutes. Star: Puff is 45 years old born in Uganda."