JavaScript 2022

Term 3 Wednesday

May - July 2022

This site will be updated live during the sessions

Week 7 Example 2a Function Scope Corrected

		
001	
		
002	
		
003	window.onload = ()=> 
		
004	{
		
005
		
006		let students = 8;
		
007
		
008		function assignTutor()
		
009		{
		
010			const tutor = "Toby Brodie";
		
011			return tutor;
		
012		}
		
013
		
014		const tutor = assignTutor();
		
015
		
016		console.log(students);
		
017		console.log(tutor);
		
018	}
		
019
		
020
		
021
		
022