Coding Flashcards

What are Operators and how are these " + , - , *, / , % " used in JavaScript?

  • Operators are special characters that indicates an action to be performed.

  • + is used for addition in arithmetic or to concatenate strings.
  • - is used for subtraction in arithmetic.
  • * is used for multiplication in arithmetic.
  • / is used for division in arithmetic.
  • % is used for finding the remainder of after division in arithmetic.
  • Go to hackerearth.com for more info!

What are Variables and Variables naming conventions?

    In programming, a variable is a value that can change, depending on conditions or on information passed to the program.

    And naming conventions is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types, functions, and other entities in source code and documentation.

What are Functions? What are Methods?

    Functions are blocks of organized, reusable code that is used to perform a single, related action.

    Methods in object-oriented programming is a procedure associated with a class. A method defines the behavior of the objects that are created from the class.

What are Arguments and Paramaters?

    An Argument is an independent items, or variables, that contain data or codes.

    A Paramater or a formal argument, is a special kind of variable, used in a subroutine to refer to one of the pieces of data provided as input to the subroutine.

What does Return do? And what does it mean to "chain methods?"

    The Return statement terminates the execution of a function and returns control to the calling function.

    Method Chaining is a common syntax for invoking multiple method calls in object-oriented programming languages. Each method returns an object, allowing the calls to be chained together in a single statement without requiring variables to store the intermediate results.

What are Strings? What are Booleans?

    A String is traditionally a sequence of characters, either as a literal constant or as some kind of variable. They are created using quotations and look like this: "~string~".

    Boolean data type is a data type that has one of two possible values (usually denoted true and false)

What does 'Undefined' mean? What does NaN stand for and when does it occur?

    The Undefined property indicates that a variable has not been assigned a value, or not declared at all.

    NaN stands for not a number, and is a numeric data type value representing an undefined or unrepresentable value. In JavaScript it is considered a number.

What does 'alert' do?

    Alert is a function that displays an alert box with a specified message and an OK button. An alert box is often used if you want to make sure information comes through to the user.

What is an escape character? How do you comment and why?

    An escape character is a character which invokes an alternative interpretation on subsequent characters in a character sequence.

    Comments are a programmer-readable explanation or annotation in the source code of a computer program. They are added with the purpose of making the source code easier for humans to understand

What is an Attribute?

    An Attribute is a specification that defines a property of an object, element, or file. It may also refer to or set the specific value for a given instance of such.

What is JavaScript and how do you link it to your HTML?

    JavaScript (JS) is an object-oriented computer programming language commonly used to create interactive effects within web browsers.

    Link it in your HTML in the "head" with script src="js/scripts.js"

What is jQuery?

    jQuery and how do you link it to your HTML? is a lightweight, "write less, do more", JavaScript library. The purpose of jQuery is to make it much easier to use JavaScript on your website. jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code.

    Link it in your HTML in the "head" with script src="js/jquery-3.4.1.js"

    NOTE: jQuery needs to be linked above your own .js file in order to allow your edits to take effect.

Click here for answer

Operators

Variables & Naming

Functions & Methods

Arguments & Parameters

Chaining & Return

Strings & Booleans

Undefined and NaN

Alert Functions

Escape & Comments

Attributes

JavaScript

jQuery

Disclaimer: