Hey there thanks for checking out my work, I hope you find something interesting or even make an improvement to one of my notebooks. Feel free to contact me with any questions.
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.
arrayFirst100Primes=()=>{
letcurrentNum=0;
letprimes=[];
while(primes.length<100){
if(isPrime(currentNum))primes.push(currentNum);
currentNum++;
}
returnprimes;
}
fibonacci(30)
fibonacci=(length)=>{
letarray=[];
letn1=0;
letn2=1;
letnewNum;
for(leti=0;i<=length;i++){
letnewNum=n1+n2;
n1=n2;
n2=newNum;
array.push(n1);
}
returnarray;
}
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.