search

Home  >  Q&A  >  body text

When I enter the if statement, the browser reports an error

VM345:1 Uncaught ReferenceError: time is not defined at <anonymous>:1:5

What does this mean, teacher?

WangWang2018 days ago1503

reply all(1)I'll reply

  • 你算哪块小饼干

    你算哪块小饼干2019-08-04 09:43:50

    You need to define the time first, the teacher defined it in advance

    var a=new Date()

    undefined

    time=a.getHours()

    9

    if(time<12)

    {

    x="Hello";

    }

    " Hello"

    That's it

    reply
    1
  • Cancelreply