// Get an SVGAngle object
const svg = document.querySelector("svg");
const angle = svg.createSVGAngle();
// Set the angle value
angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, 45);
// Check the unit type
console.log(angle.unitType); // Output: 2 (SVG_ANGLETYPE_DEG)SVGAngle: unitType property / notebook
SVGAngle: unitType property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.