... with the exercises below , syntax errors, undefined errors.if someone can help me out ,
1- Create an object with two attributes name and email, which have your name(format:first.last) and email address respectively. And then assign the object to a variable called myInfo.
2- Write a function with the name checkEmail, which accept a string as argument and return a boolean to represent if the string contains the character '@'.
Call the function checkEmail with the email argument of myInfo and assign the return value to a variable called hasValidEmail.
3- Write another function with the name splitName to split a input name string into an array by the character '.'. Example: splitName("john.doe") -> ["john","doe"] and splitName("john.will.doe") -> ["john","will","doe"]
Call the function splitName with the name attribute of myInfo and assign the first element of the returning array to a variable called firstName