foramted function.js