Outputs in JavaScript (OCR A-Level Computer Science): Quizzes

📚Quizzes
Outputs in JavaScript
Sign up to keep practising.Create a free account to play more quizzes and track your progress.

Practise the questions

10 questions from this quiz

Show

What are outputs in JavaScript used for?

Displaying information to the user

What does console.log() do?

Outputs info to the browser's console

What does alert() do in JavaScript?

Displays a pop-up message

What does document.write() do?

Writes output directly to HTML document

What is the problem with document.write()?

It overwrites the document

When is console.log() most appropriate to use?

For debugging

When is alert() most appropriate to use?

For interacting with users

How should document.write() be used?

Sparingly

Which method outputs directly to an HTML element?

innerHTML

Which output method is essential for debugging?

console.log()

Explore OCR A-Level Computer Science Revision Notes by Topics

Explore OCR A-Level Computer Science Model Answers by Topics

Explore OCR A-Level Computer Science Flashcards by Topics

Explore OCR A-Level Computer Science Exam Questions by Topics

Join 100,000+ A-Level students studying Quizzes with us.

Select your subjects, and get access to A+ resources today.