需要指导与分配范围和回报

时间:2019-06-20 16:28:29

标签: javascript

我正在尝试做一项作业,并且完全陷于作业的一部分。您能帮我看看我在想什么吗?

// Example Code: Reference this code for the next Exercise
let school = 'Lambda';
let className = 'Intro to Web Dev'

function nameMySchool() {
  let className = "Web Development Fundamentals"
  console.log(school);
}

nameMySchool();
console.log(className);
// Do not change any code above this line!


// Exercise One: 
// Part One: Create a variable called 'inFunction' and 
//           assign it to the value that will be logged
//           on line 7.


// Part Two: Create a variable called 'outsideFunction' and
//           assign it to the value that will be logged on  
//           line 11.
const inFunction = ‘Lambda’

function nameMySchool() {

  const outsideFunction = ‘School’

  console.log(inFunction) // Lambda 

  console.log(outsideFunction) // School 

}

总是说未定义功能。我很迷失。请帮助

0 个答案:

没有答案