Short Circuiting
function getIconPath(icon) {
const path = icon.path ? Icon.path : 'C:\temp\file.png';
return 'prefix' + path;
}
function getIconPath(icon) {
const path = icon.path || 'C:\temp\file.png';
return 'prefix' + path;
}
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext