JavaScript Beginner Exams QUESTIONS AND ANSWERS
JavaScript Beginner JavaScript - Answer-Language used to add special effects and interactivity to a website JavaScript Script Element - Answer-To write script within an HTML file. JavaScript Alert Function - Answer-Allows you to 'alert' your user with a popup window that displays over the screen with a custom message you provide. JavaScript Comment - Answer-// is the JavaScript comment used to keep something in your code and hidden from the web browser. JavaScript Data Types - Answer-There are three main types of data: String, Number, and Boolean. JavaScript String Data - Answer-Is a group of words, like a sentence. When writing a String in JavaScript, you need to wrap the group of words you are using within quotes. JavaScript Number Data - Answer-Is just that, a number and unlike a String, a Number does not need to be wrapped in anything. If you write out a number, like 24, it will be read as a number automatically. JavaScript Boolean Data - Answer-Is a logical entity and can only have two values: true and false. A Boolean is like a Number and does not need to be wrapped in anything. If you set something to true, it will be read as a Boolean. JavaScript Variables - Answer-They hold a value so you can use it throughout your websites. JavaScript If Statements - Answer-Allow you only to execute code when certain conditions are met. Like if x is true then do y. JavaScript Comparison Operators - Answer-Used to compare data types. Includes =, ===, !==, , and more. JavaScript Else Statement - Answer-Provides a second option of what to do if the conditions in your if statement is NOT true. JavaScript Else If Statements - Answer-This condition will be executed when the first if statement is not true but will also check to see if the conditions in the else if is true. JavaScript Arrays - Answer-Used to store multiple values within one variable. JavaScript .length Property - Answer-Will return how many values are within the array. JavaScript .sort() Property - Answer-Will sort your array and return another array
Document information
- Uploaded on
- May 23, 2024
- Number of pages
- 3
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers