
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
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
100 questions
US Constitution
Flashcard
•
9th - 12th Grade
136 questions
Acres Semester 1 2023
Flashcard
•
10th Grade
136 questions
АКТ СЕССИЯ
Flashcard
•
University
138 questions
PMA 2 REVIEW
Flashcard
•
7th Grade - University
93 questions
USI Certification Review
Flashcard
•
KG - University
92 questions
Citizenship and Immigration Test
Flashcard
•
7th - 8th Grade
90 questions
Flood and Disaster Management Vocabulary
Flashcard
•
University
84 questions
AP Government Unit 2 Review
Flashcard
•
12th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade