Player not responding to Jump Input

(I’m really new at Unity! Please be forgiving!)
I’m working on a tutorial series where I have the Character Controller scripted to do some basic movement with the arrow keys and WASD with the spacebar set to make the player jump. Everything works except the jump. Not really sure how to fix this. Any ideas? Here’s my code:

using UnityEngine;
using System.Collections;

public class PlayerMovement : MonoBehaviour 
{
	CharacterController _controller;
	
	[SerializeField]
	float _moveSpeed = 5.0f;
	
	[SerializeField]
	float _jumpSpeed = 20.0f;
	
	[SerializeField]
	float _gravity = 1.0f;
	
	float _yVelocity = 0.0f;

	// Use this for initialization
	void Start () 
	{
		_controller = GetComponent<CharacterController>();
	}
	
	// Update is called once per frame
	void Update () 
	{
		Vector3 direction = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
		Vector3 velocity = direction * _moveSpeed;
		
		if (_controller.isGrounded)
		{
			if (Input.GetButtonDown("jump"))
			{
				_yVelocity = _jumpSpeed;
			}
		}
		else
			{
				_yVelocity -= _gravity;
			}
		
		velocity.y = _yVelocity;
		
		_controller.Move(direction * Time.deltaTime);
	}
}

This is something you need to get used to

A good technique is to add

// Add inside Input.Getbutton brackets
Debug.Log("My jump velocity when I jump is: " + _jumpSpeed);

Doing checks like this along the code will help you find where something is going wrong.

Also check if your _jumpSpeed variable in the inspector is 0 or something. Values in the inspector(unity editor) thrump any values inside the code.