Know what promises are in Javascript Flashcards
Know what promises are in Javascript
Promises in JavaScript are objects that represent the eventual completion or failure of an asynchronous operation and its resulting value.
What is the Default font size in a website
16px
What is a function in Javascript
In JavaScript, a function is a block of code designed to perform a particular task and is executed when “called” or “invoked”.
What are Javascript Built-ins and what are some examples?
JavaScript built-ins are functions and objects that are built into the JavaScript language and do not require any external libraries. Examples include Math, Date, and Array.
Describe a runtime error
A runtime error is an error that occurs when a program is running and can cause the program to crash or behave unexpectedly.
How would you display video game 2D graphics without plug-ins?
2D graphics can be displayed without plugins using HTML5 Canvas or SVG.
How do you vertically align an image?
To vertically align an image, set the display property of the parent element to “flex” and then use the “align-items” property with a value of “center”.
What is a FIPPA and what does it do?
FIPPA stands for Freedom of Information and Protection of Privacy Act, which is a Canadian law that regulates the collection, use, and disclosure of personal information by public bodies.
What can you do to make sure a website will display correctly on Mobile Devices?
To ensure a website displays correctly on mobile devices, use responsive design techniques such as using media queries and flexible layouts.
Describe a Grid-based layout.
A grid-based layout is a design approach that uses a grid system to organize content on a webpage.
What’s the code to link an external CSS to HTML5?
To link an external CSS to HTML, use the <link></link> tag with the “href” attribute set to the path of the CSS file.
How do you embed JavaScript into a HTML5 document?
To embed JavaScript into an HTML5 document, use the
tag with the "src" attribute set to the path of the JavaScript file or include the JavaScript code directly within thetags.
Know what a valid assignment expression in JavaScript looks like.
A valid assignment expression in JavaScript looks like “variable = value”.
How do you show calculation result of several field in a form?
To show calculation results of several fields in a form, write a JavaScript function that calculates the values and displays the result in another field.
How would you add whitespace between each item in form?
To add whitespace between each item in a form, use the CSS “margin” property with a value of the desired amount of whitespace.
Know what a CSS declaration looks like.
A CSS declaration consists of a property and a value separated by a colon, and is enclosed in curly braces. For example: “color: red;”
Know the differences between a method and a function
In JavaScript, a method is a function that is associated with an object, while a function is a standalone block of code that can be called from anywhere in the program.
What is the role of Javascript objects in Javascript
JavaScript objects are used to store and manipulate data, and can be used to represent real-world objects or concepts.
Describe the Javascript confirm() method.
The JavaScript confirm() method displays a dialog box with a message and OK/Cancel buttons, and returns true if the user clicks OK and false if the user clicks Cancel.
How do you ensure cross-browser compatibility?
To ensure cross-browser compatibility, use web standards and write code that is compatible with multiple browsers, test the website on different browsers, and use polyfills or fallbacks for features that are not supported in some browsers.
What HTML5 attribute checks to see if a text area is empty when the form is submitted?
The HTML5 “required” attribute checks to see if a text area is empty when the form is submitted.
What HTML structural element would you place advertisements?
Advertisements can be placed within the <aside> element in HTML.
What HTML structural element would you place a company logo?
A company logo can be placed within the <header> element in HTML.
What is Text-overflow?
Text-overflow is a CSS property that specifies how to handle text that overflows the boundaries of its container element.
What the difference between an alert and a prompt?
An alert displays a dialog box with a message and an OK button, while a prompt displays a dialog box with a message, a text input field, and OK/Cancel buttons, and returns the value entered in the input field.
In relation to a computer programming, scripting, or markup language, a “bug “is an error in the code. Which type of bug will not cause error alert?
A syntax error is a type of bug that results from incorrect code syntax and can cause error alerts.
What are round buttons in a group of predetermined choices called?
Round buttons in a group of predetermined choices are called radio buttons.
Know what the difference between null vs undefined.
null is a value that represents the intentional absence of any object value, while undefined is a value that represents an uninitialized or non-existent variable.
What happens when you specify the value cover to the background-size property?
When you specify the value “cover” to the background-size property, the background image is scaled to cover the entire element while maintaining its aspect ratio.
Web designer were forced to format their pages using only fonts that were installed (or likely to be installed) on users computers. With css3, you can now specify an font you want, even custom fonts, using?
Custom fonts can be specified using the @font-face rule in CSS3.
What happens when you specify the value contained in the background-size property?
When you specify the value “contained” in the background-size property, the background image is scaled to fit within the element while maintaining its aspect ratio.