• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 16 pages
Exam (elaborations)

JavaScript, web development questions with actual answers.

Document preview thumbnail
Preview 3 out of 16 pages

JavaScript, web development questions with actual answers.

Content preview

JavaScript, web development questions
with actual answers.
programming ANS -the process of taking a problem stated in plain language and writing a set of
instructions to handle the problem (algorithm) in terms your computer can understand (programming
language)



program ANS -a set of instructions for a computer to carry out



algorithm ANS -a step-by-step procedure for solving a problem



jQuery ANS -Popular 3rd party Javascript library



const ANS -Prefix keyword to make a variable constant, you can't change its value



let ANS -Prefix keyword to make a variable that you CAN (but don't need to) change its value

* can be declared without initially setting a value (example=> let myVar;



var ANS -an older way to declare a variable, used in legacy code, differs from `let` slightly when it comes
to variable scope



null ANS -data type that represents a variable with no assigned value



undefined ANS -data type that hasn't been assigned a value. You wouldn't want to purposefully assign
`undefined` as a value but you can always to see if a variable is (or is not)



data types ANS --string(letters/words/unicode characters)

-number (whole or decimal numbers)

-boolean (true/false)

-null (no assigned value)

,-undefined (don't assign this type)

-functions (not technically a data type)

-objects (complex data type--combines primitive data types)



coercion ANS -JS "forcing" a data type to match that of another when you use an operator such as `+`.

EXAMPLE:

const stringVar = 'Kilroy was here ';

const numVar = 12;



const combined = stringVar + numVar;

typeof combined; // => string

console.log(combined); // => Kilroy was here 12



hoisting ANS -JavaScript engine sets up memory for variables and functions that you have made. It is a
way browsers reads through JS...first from top to bottom it identifies all variables and declares space for
them THEN it goes through and executes commands (like functions)



DOM ANS -*the way developers can manipulate webpages using JS



function call sign ANS -( ) .... refers to the arguments or parameters — if any — that get passed to a
function



determinate ANS -In regards to FUNCTIONS...Given the same inputs on separate invocations, the result
should be exactly the same.



function declaration ANS -function myFunction() {

console.log("myFunction");

}



function expression ANS -const myFunction = function(arg1, arg2) {

, console.log("myFunction");

};



**this is a valid way to create a function and some development teams MAY prefer this way



arrow functions ANS -=>

const add = (num1, num2) => num1 + num2;

add(2, 3) // => 5;



// same as above...just uses function keyword

instead of arrow

const addAlt = function(num1, num2) {

return num1 + num2;

}



function ANS -* a block of instructions that can be called on in

code

* a little "machine" that does a specific thing



quotation mark delimiter ANS -'\' --- use the backslash to escape the quotation

mark delimiter

EXAMPLE: const talkSome = "I said \"hi there\"";



* `\` is also used to break long strings into

separate lines



string methods ANS -some examples are:

const fooBar = 'foo bar foo bar';

fooBar.length; // => 15

Document information

Uploaded on
September 9, 2024
Number of pages
16
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Professorkaylee
3.5
(17)
Sold
65
Followers
5
Items
9809
Last sold
1 month ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions