rubik's cube algorithm in javascript

JavaScript
// Create a new solved cube instance
const cube = new Cube();

// Apply an algorithm or randomize the cube state
cube.move("U F R2 B' D2 L'");
cube.randomize();

// Create a new random cube
const randomCube = Cube.random();
Source

Also in JavaScript: