GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

To write a regular expression literal that matches the subst…

To write a regular expression literal that matches the substring of characters “go”, you place it between two backslashes, retaining the quotation marks, like this: \”go”\.

Read Details

RSS newsfeeds _____.

RSS newsfeeds _____.

Read Details

You can use Boolean values to allow your program to decide w…

You can use Boolean values to allow your program to decide which code blocks to execute.

Read Details

The following JavaScript code will successfully log the phra…

The following JavaScript code will successfully log the phrases “Character class: Wizard,” “Character weapon: Staff of wisdom,” and “Character healthLevel: 115” to the console.let character = {   class: “Wizard”,   weapon: “Staff of wisdom”,   healthLevel: 115};for (let prop in character) {   console.log(“Character ” + prop + “: ” + character[prop]);}

Read Details

Attempting to use a variable that is referenced outside its…

Attempting to use a variable that is referenced outside its lexical environment, which encompasses functions and the variables they use, will result in an error.

Read Details

When you insert several JavaScript scripts into an HTML file…

When you insert several JavaScript scripts into an HTML file, you must repeat statements declaring and initializing variables in each script because the statements in one script are unavailable to other scripts in the file.

Read Details

Suppose you have just written a JavaScript constructor for a…

Suppose you have just written a JavaScript constructor for a button class and then created an instance of this class called button1. Adding the following code to your program _____.function buttonCollection(ownerName) {   this.buttonItems = [];   this.owner = ownerName;}let myCollection = new buttonCollection(“Mel”);myCollection.buttonItems.push(button1);

Read Details

What type of method is sizeCategory() in the following JavaS…

What type of method is sizeCategory() in the following JavaScript code?function stones(stoneCount) {   this.count = stoneCount;   function sizeCategory() {   if (stoneCount > 10) return “Big”;   else return “Small”;   }   this.showCategory = function() {   console.log(“Category: ” sizeCategory()};   }}

Read Details

The following JavaScript code will display the message “Plea…

The following JavaScript code will display the message “Please enter your name!” instead of the browser’s native error message when executed in response to a user trying to submit a web form without entering text in the lastName field, which has the required attribute. let lastName = document.getElementById(“lastName”);lastName.setCustomValidity(“Please enter your name!”);

Read Details

When you use the regular expression /(\w+)\s(\w+),?/g to mat…

When you use the regular expression /(\w+)\s(\w+),?/g to match substrings, information about the substring matched by the first (\w+) group is stored in the $1 property of the associated JavaScript RegExp object.

Read Details

Posts pagination

Newer posts 1 … 41 42 43 44 45 … 70,207 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top