“Undefined” error when i type “todoList = await TodoList.deployed()” in truffle console

https://ethereum.stackexchange.com/questions/145165/undefined-error-when-i-type-todolist-await-todolist-deployed-in-truffle

I was trying this Beginner tutorial on smart contracts and solidity. I typed truffle compile, truffle migrate and they ran without any error . when i opened truffle console and typed TodoList = await TodoList.deployed() as per the tutorial i got error Undefined

var TodoList = artifacts.require(".TodoList.sol");
module.exports = function(deployer) {
  deployer.deploy(TodoList);
}