Advertisement
Liliana797979

viarno reshenie na rectangle - js advanced

Sep 30th, 2021
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function rectangle(width, height, color) {
  2.  
  3.     return {
  4.         width,
  5.         height,
  6.         color: color[0].toUpperCase() + color.slice(1),
  7.         calcArea() {
  8.             return width * height;
  9.         }
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement