hadijahkyampeire / WITI-JAVASCRIPT-TEST

WITI cohort 2 Test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WITI-JAVASCRIPT-TEST

WITI cohort 2 Test

Questions

  1. ​Write a JavaScript program to change text color to blue on mouse over. (1mk)

  2. Write a JavaScript function to check whether an input is a string or not. (1mk)

  3. 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)

  4. Write a JavaScript function to split a string and convert it into an array of words. (1mk)

  5. 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)

  6. 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."

Screenshots for question 9.

  • Passing Passing

  • Failing Failing

Screenshot for question 7

Hover effect

Screenshots for JS logs

JS logs

About

WITI cohort 2 Test


Languages

Language:HTML 45.7%Language:JavaScript 31.1%Language:CSS 23.2%