6. Javascript Flashcards
What interactive features does Javascript allow to create? (4)
- sliders
- pop-ups
- form validation
- dynamic content loading
How can Javascript HTML and CSS to update the content of a web page dynamically?
Without reloading the page
Data types (3)?
- Numbers: For any kind of numeric value.
- Strings: For text data.
- Boolean: For true/false logic.
How are variable names called?
Identifiers
What does console allow developer to do?
helps you debug, test, and inspect your code while working in the browser or in a development environment like VS Code
What does an array contain?
Elements
Function to convert string into integer?
parseInt()
Function to convert a string into a
floating-point (decimal) number?
parseFloat()
Function to format a number to a specified number of decimal places (string representation of the number)
toFixed()
Output for parseInt(“Hello”)
Output: NaN (invalid input)
Output for parseFloat(42.99abc)
42.99
parseFloat(abc123)
Output: NaN (invalid input)
Single line comment
// This is a single-line comment
Multi line comment
/*
This is a multi-line comment.
It can span multiple lines
without any issues.
*/
What can identifiers contain? (4)
- letters
- numbers
- underscore
- dollar sign