Skip to content

Commit

Permalink
convert a better message of how to use the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Athesto committed Jan 15, 2024
1 parent 49f247c commit de5b479
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions snippets/platzi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,51 @@ function openResumen(){

output = {}
output.data = getData()
output.str = JSON.stringify(output.data, null, 2)
output.json = JSON.stringify(output.data, null, 2)
output.csv = data2CSV(output.data).join('\n')
output.data

console.log(`
Welcome this Athesto's snippet.
This snippet get the information of the summary and create an object ot it
If you want to see the summary of the responses you can write
console.log(output.data)
console.log(output.json)
console.log(output.csv)
this code has 2 main function and a preset Variable
getData - returns an Array of objects with the next response
- getData(): {
courseName: string
question: string
answer: string
isCorrect: boolean
}
data2CSV - converts an Array of data into a string
- data2CSV(data[]): string
output - is the variable with the next props
- output:
{
data: Array of responses
json: Stringify version of Array
csv: CSV string version of Array
}
If you have any doubt or any error please create a ticket in the url
athesto.github.io/repo
Be save
`)

0 comments on commit de5b479

Please sign in to comment.