Introduction to JavaScript Flashcards
What is JavaScript designed to add to HTML pages?
Interactivity.
Who developed JavaScript?
Brendan Eich.
Can JavaScript validate data on a webpage?
Yes.
Name one way JavaScript can react to events?
It can execute when a page finishes loading or when a user clicks on an HTML element.
Is JavaScript the same as Java?
No
What type of language is JavaScript?
A scripting language.
Can JavaScript be used in mobile app development?
Yes.
What browsers support JavaScript?
All modern web browsers like Chrome
Where can JavaScript be placed in an HTML file?
In the <head>
What is the syntax to start a JavaScript script in HTML?
<script> . </script>
Can JavaScript read and write HTML elements?
Yes.
What attribute is used to set the alignment of a paragraph in HTML?
align.
What is the most popular programming language in the world?
JavaScript.
Can JavaScript detect the visitor’s browser?
Yes.
What makes JavaScript a great choice for programmers?
Its simplicity and versatility.
What are the four core attributes in HTML?
ID
What is the function of the dir attribute in HTML?
It indicates the text direction.
What is an HTML element defined by?
A starting and a closing tag.
What attribute is used to define characteristics of an HTML element?
An attribute inside the element’s opening tag.
What is a scripting language?
A lightweight programming language.
Who can use JavaScript to add functionality to web pages?
HTML designers.
What framework is JavaScript commonly used with?
jQuery.
What is the replacement for the lang attribute in XHTML?
xml:lang.
What job opportunities does learning JavaScript provide?
Web
How does JavaScript affect websites?
It makes them interactive and fast.
What tag defines the start of a paragraph in HTML?
<p>.
</p>
What are the two parts of an HTML attribute?
Name and value.
Can JavaScript validate forms?
Yes.
What modern web development roles require JavaScript?
Front-end and back-end development.
What does JavaScript execute on?
The browser.
Is JavaScript installed on modern browsers by default?
Yes.
What is the syntax to close a paragraph tag?
</p>.
What is the purpose of the xml:lang attribute?
To specify the language using an ISO-639 code.
Does JavaScript require a special environment setup?
No.
What is the main use of JavaScript frameworks?
To speed up development.
What is an example of JavaScript being reactive?
Executing on a button click.
What job growth is associated with JavaScript skills?
High demand and pay.
Can JavaScript be executed during page loading?
Yes.
What makes JavaScript suitable for non-programmers?
Its simple syntax.
What is JavaScript often used to enhance?
User experience.
What does JavaScript enable in mobile app development?
Cross-platform functionality.
What attribute in HTML specifies language direction?
dir.
What is an advantage of JavaScript frameworks and libraries?
Reduced time to market.
What is the purpose of the class attribute?
To apply styles or scripts to elements.
What attribute is backward-compatible with older HTML?
lang.
What attribute in HTML sets the main language of a document?
lang or xml:lang.
Can JavaScript be included in external files?
Yes.
What makes JavaScript ideal for interactive content?
It can react to events.
What section is JavaScript often included in an HTML file?
<head> or <body>.
</body></head>
What is JavaScript’s primary role in web design?
Adding interactivity.
Can JavaScript create animations on a webpage?
Yes.
What type of software can be built with JavaScript?
Web
How is JavaScript executed in browsers?
Immediately during page load.