JavaScript tutorial (Part 1)

So it should be:
console.log("My name is "+prompt("What is your name?", "Funtime Foxy"))
console.log("Donald Trump is Donald duck, when you turn his head upside down")

SyntaxError: missing ')' after argument list on line 0

I did what

console.log("My name is "+prompt("What is your name?", "Funtime Foxy")
console.log("Donald Trump is Donald duck, when you turn his head upside down")

said.

  1. Missing ) on the first line
  2. myObject.myString will return "William Afton is Purple Guy", not "Flip flops are cool."

Ohhhhhh
I for got to close the parens

@danielthebanana4,where did you learn js?
w3schools?
runoob?
khanacadamy?

I fixed it. Wait, where am I missing the parenthesis?

console.log("My name is "+prompt("What is your name?", "Funtime Foxy"))
console.log("Donald Trump is Donald duck, when you turn his head upside down")

var myObject = {
myNumber: 42,
myString: "Flip flops are cool.",
myOtherObject: {a: 0, b: 1},
userInput: window.prompt("Enter a value");
};
myObject.myNumber //this returns 42
myObject.myString //this returns "Flip flops are cool." "William Afton is Purple Guy"
myObject.myOtherObject //this returns {a: 0, b: 1}
myObject.myOtherObject.a //this returns 0
myObject.myOtherObject.b //this returns 1
myObject.userInput //this returns whatever the user inputted, or null if the user clicked Cancel

Huh, I remember khanacademy.......lemme look into my clever and see if its blocked.

I meant ), not (

  1. Unneccary seimicolon on 8th line

Whoops! I missed that! I'm changing it.

w3schools

1 Like

Can someone send me a link to Khan Academy? I remember using it, its just not on clever like it was back in fifth grade...
@18001767679 gave me an idea.

Thats....blocked....its not supposed to be blocked. My fifth grade teacher even told me to use it, well, I am in middle school, not in fifth grade anymore....

me too

it is html to me(i know it)

remember me?

Hello there. :)