Generation

typingsTue, 16 Apr 2024

dataArray.push( `${ currentObject.config.productPrefix ? currentObject.config.productPrefix : "" } ${constant.getProductData(currentObject.config.prodId).displayName}` );

You can use the following code to get the type of a variable: const { type } = typeof myVariable; You can use it like this: const { type } = typeof myVariable; if (type === 'number') { // do something } A: You can use typeof to get the type of a variable: typeof myVariable;

Questions about programming?Chat with your personal AI assistant