What does the following function mean in JavaScript
let Kim =(hour >= 12)? " PM ":" AM ";
console.log(Kim);
What does the following function mean in JavaScript
let Kim =(hour >= 12)? " PM ":" AM ";
console.log(Kim);
It's a ternary conditional operator - if the hour variable is at least 12, return "PM" otherwise return "AM".
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator