Published
Edited
Feb 19, 2019
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
myarray[2]
Insert cell
get=myarray.slice(0,2)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
array1=['I', 'am', 'learning','Javascript','to','munge','large','datasets','and','visualize','them']
Insert cell
Insert cell
// Your code here
{let array2=JSON.parse(JSON.stringify(array1))
array2=array2.join(" ")
return array2}
Insert cell
Insert cell
{let array3=JSON.parse(JSON.stringify(array1))
array3=array3.sort()
return array3}
Insert cell
{
let array4=array1.slice()
return array4.sort(function (a, b) {return a.toLowerCase().localeCompare(b.toLowerCase())})
}
Insert cell
{let array6=JSON.parse(JSON.stringify(array1))
return array6.sort(function (a, b) {return b.toLowerCase().localeCompare(a.toLowerCase())})
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// Your code here

Insert cell
Insert cell
Insert cell
Insert cell
// Your code here
function convert(a) {
let A=JSON.parse(JSON.stringify(a))
A.favorite[0].name=a.favorite[0].name.toUpperCase();
A.favorite[1].name=a.favorite[1].name.toUpperCase();
return A
}
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more