Ask coding questions

← Back to all posts
Feeling a little confused
TimEvans (0)

What am I doing wrong here
// #3
myArray.push('Timothy Evans, 1992');
console.log(myArray);

// #4
var splitName = fullName.split('');
console.log('');

// #5
var sayHello = function() {
console.log("Hello," + "TimothyEvans[0]")
};
sayHello();

Commentshotnewtop
vedprad1 (693)

We are not in your class. Thus, we do not know the instructions. Could you please post the instructions, too? Thanks!

TimEvans (0)

This is the Question "Add the variables from #1 (fullName and birthYear) to myArray using the push method. Print myArray to the console."

TimEvans (0)

Remember that the variables / functions created in this exercise are persistent throughout. Make sure you use them when prompted!

myArray.push('Timothy Evans', 1992);
console.log(myArray);

TimEvans (0)

Sorry, I'm having some trouble with my JS split.

Zavexeon (249)

Can you please elaborate on what you are trying to do, and what is going wrong, please?
I did notice a thing though. Why do you have parentheses around TimothyEvans[0]?