
JavaScript (JS) Cheat Sheet
Flashcard
•
Computers
•
10th Grade
•
Easy
Joseph Armanious
Used 8+ times
FREE Resource
Student preview

122 questions
Show all answers
1.
FLASHCARD QUESTION
Front
How to include an external JavaScript file?
Back
<script src="filename.js"></script>
2.
FLASHCARD QUESTION
Front
What is the syntax for a function in JavaScript?
Back
function addNumbers(a, b) { return a + b; }
3.
FLASHCARD QUESTION
Front
How do you edit a DOM element in JavaScript?
Back
document.getElementById("elementID").innerHTML = "Hello World!";
4.
FLASHCARD QUESTION
Front
How to output data to the browser console in JavaScript?
Back
console.log(a);
5.
FLASHCARD QUESTION
Front
What is the syntax for a for loop in JavaScript?
Back
for (var i = 0; i < 10; i++) {
document.write(i + ": " + i*3 + "
");
}
6.
FLASHCARD QUESTION
Front
How do you declare a variable in JavaScript?
Back
var a; // variable a = 1; // assignment
7.
FLASHCARD QUESTION
Front
What is the purpose of 'use strict' in JavaScript?
Back
"use strict"; // Use strict mode to write secure code
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
87 questions
Unit 8 Study Guide
Flashcard
•
KG - University
85 questions
Sports Marketing Fall 24 Final Exam Review
Flashcard
•
9th - 12th Grade
77 questions
US History EOC Review
Flashcard
•
11th Grade
105 questions
World Geography Final Exam Study
Flashcard
•
9th Grade
100 questions
Civics Test
Flashcard
•
10th - 12th Grade
135 questions
CAE FE
Flashcard
•
University
92 questions
Judicial Branch (AP GOV) Review
Flashcard
•
10th Grade
136 questions
Kapkore 1-5
Flashcard
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade