Jump to content
Killersites Community
Sign in to follow this  
webmanz

using one line of code for indexOf()

Recommended Posts

Chapter 5 lesson 5

5.37 minute mark of video

alert("Alert: " + "stef@studioweb.com" . indexOf("@")

For the above to work do I still need to type in code mentioning console log? In other words just that one line of code without any mention of console log or anything else?

By anything else I mean:

var email

var theAt

console.log

In the video the js position shows up in console log using that one line of code.

Share this post


Link to post
Share on other sites

console.log is only needed if you want to push something to the log. Remember, log() is a method inside of the console object.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×