🤷♀️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const basePerson = { | |
firstName: "Max" | |
}; | |
const person = Object.assign({}, basePerson, { lastName: "" }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const condition = true; | |
const result = condition && { lastName: "" }; | |
console.log(result); | |
// Will log { lastName: "" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const a = false; | |
const b = true; | |
const result = a && b; | |
console.log(result); | |
// Will log false | |
const c = false; | |
const d = false; | |
const result = c && d; | |
console.log(result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const a = true; | |
const b = true; | |
const result = a && b; | |
console.log(result); | |
// Will log true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const a = true; | |
const b = "Magic String"; | |
const result = a && b; | |
console.log(result); | |
// Will log "Magic String" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const condition = getCondition(); | |
const additionalCondition = getAdditionalCondition(); | |
const person = { | |
firstName: "Max", | |
...(condition && { lastName: "" }), | |
...(additionalCondition && { addition: "" }) | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const person = { | |
firstName: "Max" | |
}; | |
const condition = getCondition(); | |
const additionalCondition = getAdditionalCondition(); | |
if (condition) { | |
person.lastName = ""; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const person = { | |
firstName: "Max" | |
}; | |
const condition = getCondition(); | |
if (condition) { | |
person.lastName = ""; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const person = { | |
firstName: "Max" | |
}; | |
person.lastName = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "klarna/kco_rest_php", | |
"rules": [ | |
{ "passed": true, "id": "license-file-exists" }, | |
{ "passed": true, "id": "readme-file-exists" }, | |
{ "passed": false, "id": "contributing-file-exists" }, | |
{ "passed": false, "id": "code-of-conduct-file-exists" }, | |
{ "passed": false, "id": "support-file-exists" }, | |
{ "passed": true, "id": "readme-references-license" }, |