Quick actions

cmd+k|ctrl+k

Navigation

Languages

callback function 2

Snippet info

Language

JavaScript

Visibility

public

Author

hltse59

Created

2026-01-20T15:15:51.716487Z

Updated

2026-01-20T22:54:10.887888Z

// call function youtube 教學
// https://www.youtube.com/watch?v=-tPh-47H8u8
let webLang = ['PHP', 'JavaScript', 'CSS', 'HTML', 'React.JS'];
webLang.forEach((element)=>console.log(element));
console.log("--------------------------");

webLang.forEach((ele)=>{
    console.log(ele)
    }
);
console.log("--------------------------");

let item = 10;
const amount =(tax, item) => item * tax/100;
const partial=(func, tax, item)=> {return func(tax, item)};

let tax =  partial(amount, 0.5, item)   // amount is a function which refer to 
console.log(tax)
INFO