Skip to content

Latest commit

 

History

History

0x13-javascript_objects_scopes_closures

JavaScript Objects, Scopes, and Closures

Technologies

  • Files written in vi, vim, and emacs editors.
  • Files wriiten according to the
  • Files tested on Ubuntu 20.04 LTS.
  • JavaScript files

Files

File Question
0-rectangle.js Write an empty class Rectangle that defines a rectangle.
1-rectangle.js Write a class Rectangle that defines a rectangle with a constructor with 2 arguments w = width and h = height
2-rectangle.js Write a class Rectangle that defines a rectangle with a constructor with 2 arguments w = width and h = height.If w or h is equal to 0 or not a positive integer, create an empty object.
3-rectangle.js Write a class Rectangle that defines a rectangle with a constructor with 2 arguments w = width and h = height. If w or h is equal to 0 or not a positive integer, create an empty object. Create an instance method called print() that prints the rectangle using the character X
4-rectangle.js From 3-rectangle.js, create an instance method called double() that multiples the width and the height of the rectangle by 2.
5-square.js Write a class Square that defines a square and inherits from Rectangle of 4-rectangle.js.
6-square.js Modify 5-square.js. Create an instance method called charPrint(c) that prints the rectangle using the character c If c is undefined, use the character X.
7-occurrences.js Write a function that returns the number of occurrences in a list.
8-esrever.js Write a function that returns the reversed version of a list.
9-logme.js Write a function that prints the number of arguments already printed and the new argument value.
10-converter.js Write a function that converts a number from base 10 to another base passed as argument.
100-map.js Write a script that imports an array and computes a new array.
101-sorted.js Write a script that imports a dictionary of occurrences by user id and computes a dictionary of user ids by occurrence.
102-concat.js Write a script that concats 2 files.