Declare a constant variable.
PI = 3.14159;
Variables that cannot be reassigned
Return a value from a function.
function getAge() {\n 25;\n}
Stops execution and specifies value to be returned
Select an element by its ID.
document.( "myId" );
Most common way to access HTML element
Loop through an array.
fruits.(function(fruit) {\n console.log(fruit);\n});
Calls a function for each array element
Attach a click event listener to a button.
btn.( "click" , function() {...});
Sets up a function that will be called whenever the specified event is delivered
Save data to local storage.
.setItem("user", "John");
Stores data with no expiration date
Write a short arrow function.
const add = (a, b) a + b;
Shorter syntax for a function expression
Certificate Locked
You must complete the exercises with a score of 70% or higher to unlock your certificate.
ProTechSolution
Certificate of Completion
Proudly Presented To
Student Name
For successfully completing all exercises and challenges with an outstanding score in the JavaScript course.
Verify ID: LH-XXXX-XXXXXX