// Get an SVGAngle object
const svg = document.querySelector("svg");
const angle = svg.createSVGAngle();
// Set the value of the angle in degrees
angle.value = 45;
console.log(angle.valueInSpecifiedUnits); // Output: 45
// Update the numeric factor of the angle
angle.valueInSpecifiedUnits = 90;
console.log(angle.valueInSpecifiedUnits); // Output: 90SVGAngle: valueInSpecifiedUnits property / notebook
SVGAngle: valueInSpecifiedUnits property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.