https://github.com/bell-kevin/training-js-5-basic-data-types--object
In javascript, Object is one of basic data types. Define an Object can use var obj=new Object() or var obj={} You can define the object attributes during initialization, like this: var animal={name:"dog"} you can also set/get some properties after the object definition, like this: var animal={} animal.name="dog" (or animal["name"]="dog") Task Give you a function animal, accept 1 parameter:obj like this: {name:"dog",legs:4,color:"white"} and return a string like this: "This white dog has 4 legs." When you have finished the work, click "Run Tests" to see if your code is working properly. In the end, click "Submit" to submit your code pass this kata.
https://github.com/bell-kevin/training-js-5-basic-data-types--object
codewars-kata-solution
Last synced: over 1 year ago
JSON representation
In javascript, Object is one of basic data types. Define an Object can use var obj=new Object() or var obj={} You can define the object attributes during initialization, like this: var animal={name:"dog"} you can also set/get some properties after the object definition, like this: var animal={} animal.name="dog" (or animal["name"]="dog") Task Give you a function animal, accept 1 parameter:obj like this: {name:"dog",legs:4,color:"white"} and return a string like this: "This white dog has 4 legs." When you have finished the work, click "Run Tests" to see if your code is working properly. In the end, click "Submit" to submit your code pass this kata.
- Host: GitHub
- URL: https://github.com/bell-kevin/training-js-5-basic-data-types--object
- Owner: bell-kevin
- License: gpl-3.0
- Created: 2022-06-29T01:28:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-06T22:34:38.000Z (almost 4 years ago)
- Last Synced: 2025-01-23T16:48:28.955Z (over 1 year ago)
- Topics: codewars-kata-solution
- Language: JavaScript
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0