Skip to content

dkatzz/flw2-u1l6-23-24-student-exercises

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Lesson 1.6 - Review

Declaring and Assigning Variables

let variableName = "value";

Using Variables in Strings

let sentence = `This is a ${variableName}.`;
console.log(sentence);

Conditional Assignment

let condition = /* your condition */;
let result = condition ? 'valueIfTrue' : 'valueIfFalse';
console.log(result);

Function Template

function functionName(parameters) {
    // function body
    // return statement, if needed
}

// Call the function with appropriate arguments
console.log(functionName(arguments));

For Loop Iteration

for (let i = startValue; i <= endValue; i++) {
    console.log(i); // or any other operation
}

Creating and Accessing Object Properties

let objectName = {
    propertyName1: value1,
    propertyName2: value2
    // ... more properties ...
};

console.log(objectName.propertyName1); // Accessing property

Utilize these code templates as a resource for your tasks.

Happy coding!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.3%
  • HTML 6.7%