Jump to content


Photo
Question

Function Returns undefined

undefined

  • Please log in to reply
No replies to this topic

#1 checkmate35

checkmate35

    Newbie

  • Member
  • Pip
  • 1 posts

Posted 23 December 2018 - 09:40 AM

var api = require('steam-price-api');
var colors = require('colors');
//"Exalted Manifold Paradox"
var iname ="Inscribed Blades of Voth Domosh";

item_price =function(item_name){
	var result;
	api.getprice(570,item_name,function(err, data){
		var price = data.body.lowest_price;
		var valid = price.replace(" ","").replace("TL","").replace(",",".");
		var last= parseFloat(valid.split(" ")[0]);

		
	console.log(last);
	//return last;
},17)	
}

console.log(item_price(iname));






Also tagged with one or more of these keywords: Question, undefined

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users