Modern Application Development II, End Term
Consider the following Script embedded in an HTML document.
let langName = 'Python';function showLanguage() { let langName = "JavaScript"; let message = 'Learn ' + langName; console.log(message);}
let message = 'Learn ' + langName;console.log(message)console.log(showLanguage());What will be the output on console, if the HTML document is rendered using a browser?
Consider the following Script embedded in an HTML document. let langName = 'Python'; function showLanguage() { let langName = "JavaScript"; let message = 'Learn ' + langName; console.log(message); } let message = 'Learn ' + langName; console.log(message) console.log(showLanguage()); What will be the output on console, if the HTML document is rendered using a browser? Consider the following Script embedded in an HTML document. let x = [1, 'p', a => a + 1]; for (const i = 0; i<x.length; i++) { console.log(i, x[i], typeof(x[i])) } Which of the following statement is correct, if the HTML document is rendered using a browser? Assuming the URL gives a valid json response, what will be the output in the console? fetch('https://study.iitm.ac.in/api/data') .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error(error)); console.log('End of script');