19 lines
No EOL
458 B
JavaScript
19 lines
No EOL
458 B
JavaScript
// These variables are unknown to useFoo, as they are
|
|
// defined at module scope or implicit globals
|
|
const isSelected = false;
|
|
const isCurrent = true;
|
|
function useFoo() {
|
|
for (let i = 0; i <= 5; i++) {
|
|
let color;
|
|
if (isSelected) {
|
|
color = isCurrent ? "#FFCC22" : "#FF5050";
|
|
} else {
|
|
color = isCurrent ? "#CCFF03" : "#CCCCCC";
|
|
}
|
|
color |> console.log(%);
|
|
}
|
|
}
|
|
export const FIXTURE_ENTRYPOINT = {
|
|
params: [],
|
|
fn: useFoo
|
|
}; |